你好我尝试在lovefield中使用innerjoin并尝试groupBy
像这样使用:
var userCompanies = '', company = '';
user = db.getSchema().table('user');
userCompanies = db.getSchema().table('userCompanies');
company = db.getSchema().table('company');
db.select().
from(user).
innerJoin(userCompanies, userCompanies.UserId.eq(user.Id)).
innerJoin(company, company.Id.eq(userCompanies.CompanyId)).
where(userCompanies.UserId.eq(row["Id"])).exec()
// groupBy(user, user.Id).exec()
.then(function(results) {
results.forEach(function(row) {
console.log(row['user']);
});
})
但它只给我这个错误:
Syntax error: (525) Invalid projection list or groupBy columns.