In the above example the address has reference the user (via audit createdBy) and the user has reference the address so it will throw StackOverflowException.
The solution is to check if identifierAttribute (attributes) present in the example, and if so, then create Predicate Only for those.
In the above example the QueryByExamplePredicateBuilder shuold create two Predicate:
If you agree with the problem, I would like to send a pull request with a solution that handle identifier matching if the identifier attributes are PersistentAttributeType.BASIC.
spring-projects-issues commentedJun 1, 2017
Csongor Szita opened DATAJPA-1125 and commented
The current QueryByExamplePredicateBuilder not handle cycling- and self-reference, so it throw StackOverflowException.
For example if we have the below entity-s:
And the below function:
In the above example the address has reference the user (via audit createdBy) and the user has reference the address so it will throw StackOverflowException.
The solution is to check if identifierAttribute (attributes) present in the example, and if so, then create Predicate Only for those.
In the above example the QueryByExamplePredicateBuilder shuold create two Predicate:
No further details from DATAJPA-1125
The text was updated successfully, but these errors were encountered: