Skip to content

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

@roimenashe

Description

@roimenashe

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions