0

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.

Connor D
  • 103
  • 1
  • 9

1 Answers1

0

In the subselect query, Can you remove the double quotes in "Credential.PublicID" and try to execute the query again.

Arun Kumar Mani
  • 337
  • 2
  • 7