Skip to content
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

Handle object graph circularities (A->B->A) #38

Open
roimenashe opened this issue Jun 5, 2021 · 0 comments
Open

Handle object graph circularities (A->B->A) #38

roimenashe opened this issue Jun 5, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@roimenashe
Copy link
Member

At the moment, if this was loaded from the database using non-lazy references, it would load the second A as a different instance of A, say A'. It would then load B as B', so instead of creating an object graph with circularities (A->B->A), it would create A->B->A'>B'>A''>B''>A'''…. This would result in a stack overflow or OOM

Be careful of an object A which has 2 references, 1 which references B lazily, the other which references C which references B (non-lazy). So A->B(Lazy) and A->C->B. In this case B should end up as a fully hydrated in both instances, not lazy in both instances.

The same applies to A->B(Lazy) if there also is A->B.

@roimenashe roimenashe added the enhancement New feature or request label Jun 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant