-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Relationships should honor lessThan and greaterThan between attributes #190
Comments
That's not considered a proper relationship and should throw at build time. |
Why is it not a proper relationship? In this case, I only want those Person objects which have Pet objects with ages less than the owner's age. Imperative way to do it will be to deep-fetch and then do the greater than check which I think is inefficient. |
In almost all cases, non-equi joins used for relationships are confused with query semantics.
Sounds like you're doing a query to get Persons, not defining how Person and Pet relate to each other. That should not require a relationship, just a query. Relationships are not hard-coded queries. If you want Persons, that should start with PersonFinder, not PetFinder+deep fetch. |
I do not know how to do this without a relationship and with just Finders.
|
|
A relationship like this should work:
If it is invalid then there should be build time exception. Instead, currently the build succeeds and the query generated is
Person.personId = Pet.personId
which is incorrect.Please correct me if I am doing something wrong.
The text was updated successfully, but these errors were encountered: