I'm querying a join entity, userregion, to find regions with a particular zipcode and users that are active. Then I compare the results between the two of them.
userregion
------------------------
PublicID | UserID | RegionID
regionzone
------------------------
Code | ZoneType | Region(FK)
user
------------------------
Credential | Region (FK)
var regQuery = Query.make(UserRegion).join("Region").join("ID", RegionZone, "Region").compare("Code", Equals, polZip)
var userQuery = Query.make(UserRegion).join("User").join("Credential").compare("Active", Equals, true)
regQuery.subselect("PublicID", CompareIn, userQuery, "Credential.PublicID")
The subselect is returning the following error: IllegalArgumentException: property PublicID is not on root type entity.UserRegion
I'm not quite sure what the issue is here, so any assistance would be appreciated.