-
Notifications
You must be signed in to change notification settings - Fork 166
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
SortOrder escaping bug #486
Comments
Thanks for reporting this. neo4j-ogm/test/src/test/java/org/neo4j/ogm/persistence/examples/music/MusicIntegrationTest.java Line 279 in 8518856
that do not show any problems even when I run this with Java 10. |
Actually, I am reusing the same SortOder instance each time when I fetch nodes with getAll(). In the tests, a new SortOrder instance is created when the getAll() method is called. I think this is why you can't reproduce this bug with the test you provided above. |
Great, now I can see your problem you have. |
The properties used in a SortOrder object are now processed before every usage. This makes the SortOrder class reusable in multiple calls and even allows usage for other domain classes that also have the same properties to get ordered by. Fixes #486
The properties used in a SortOrder object are now processed before every usage. This makes the SortOrder class reusable in multiple calls and even allows usage for other domain classes that also have the same properties to get ordered by. Fixes #486
The properties used in a SortOrder object are now processed before every usage. This makes the SortOrder class reusable in multiple calls and even allows usage for other domain classes that also have the same properties to get ordered by. Fixes #486 Backport to 3.0. (cherry picked from commit 1a0924d)
Expected Behavior
The method
void org.neo4j.ogm.session.resolvePropertyAnnotations(Class, SortOrder)
should escape the properties in theSortOrder
object only once.Current Behavior
The method
void org.neo4j.ogm.session.resolvePropertyAnnotations(Class, SortOrder)
is escaping theSortOrder
's properties each time it is called.Possible Solution
Create a private flag to check if the
SortOrder
's properties are already escaped.Steps to Reproduce (for bugs)
Call any
getAll()
method from a session with a providedSortOrder
instance with at least one property to sort.Reference Stacktrace
Your Environment
The text was updated successfully, but these errors were encountered: