Skip to content

How are sub entities de-duped in an entity view that generates a query with joins in? #1938

Answered by beikov
re1709 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi,
AFAIR, Blaze-Persistence does not attempt to de-duplicate elements of non-indexed collections. You can debug the implementation com.blazebit.persistence.view.impl.objectbuilder.transformer.NonIndexedTupleListTransformer.

Maybe one of your lists has an index column in the entity model i.e. @OrderColumn? The presence of that makes it an indexed list which is de-duplicated since the index provides row identity.

I would recommend you to mostly use a Set instead or SortedSet if you want a particular ordering. If the order of the elements matters to you, you should always use an @OrderColumn in your entity mapping.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@re1709
Comment options

@beikov
Comment options

Answer selected by re1709
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