Skip to content

Join queries aren't using same "root" instance #1258

Answered by dstepanov
Goldmensch asked this question in Q&A
Discussion options

You must be logged in to vote

You should probably post the output of:

System.out.println(System.identityHashCode(foundCart.parts().get(0).cart()));
System.out.println(System.identityHashCode(foundCart.parts().get(1).cart()));

When using immutable records you cannot simply modify the parent and have the children reference the updated parent.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@Goldmensch
Comment options

@dstepanov
Comment options

@Goldmensch
Comment options

Answer selected by Goldmensch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants