简体   繁体   中英

IllegalArgumentException: property PublicID is not on root type entity.UserRegion

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.

在子选择查询中,能否去掉“Credential.PublicID”中的双引号,然后再次尝试执行查询。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM