Can any one help me with the following question? In the Gosu code below, how can I include the city information in Address table in the result from the query (without turning the tables around - starting from Address table)? Address table has a foreign key point to user table, but no foreign key the other way. Can row query do that? Thanks a lot
uses gw.api.database.Query
// -- query the User entity --
var queryUser = Query.make(User)
// -- select only User instances who last updated addresses in the city of Chicago --
var tableAddress = queryUser.join(Address, "UpdateUser")
tableAddress.compare("City", Equals, "Chicago")
// -- fetch the User instances with a for loop and print them --
var result = queryUser.select()
for (user in result) {
print (user.DisplayName)
}