-
Notifications
You must be signed in to change notification settings - Fork 49
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
In Kotlin, specifying a default entity graph make query fail with Stackoverflow exception #119
Comments
BTW This is probably somehow related to kotlin(the project I'm working on is written in Kotlin), since spring may create some additional proxies for repositories in Kotlin (or can do this in a specific way) and, as a consequence, |
Hello @mr-nothing , It looks like we need to add a recursive gard. But we have to imagine an automated test allowing to reproduce the issue first. |
Hello, @reda-alaoui and thanks a lot for reply
Instead of
All the stuff above makes kotlin compiler generate java 8 compatible default interface methods instead of public static final (kinda companion) class that contains this implementation. See SO thread for more details. I will try to make a test case for this issue so we can understand how we can defend this lib from stackoverflow errors with kotlin. Also it would be nice to mention this kind of issues in documnetation. |
For some reason specifying DynamicEntityGraph as a default one make
repository.findById(id: String)
fail with stackoverflow exception. Was unable to understand if it is a bug or I just misuse/misconfigured something.Steps to reproduce the behaviour:
Where
fieldN
is aOneToOne
relation fields.findById
repository method as follows:What is the expected output ?
DynamicEntityGraph should be used to fetch
MyEntity
data.What happens instead ?
Query fails with stackoverflow error.
error.log
Environment
Link to an automated test demonstrating the problem
Unfortunately I was unable to reproduce this on sample project and I can't share my project. Will try to investigate this further but maybe stacktrace can be of some help to understand what is going on.
Additional context
n/a
The text was updated successfully, but these errors were encountered: