Traversing ORM relationships returns duplicate results
Posted
by
NKing253
on Stack Overflow
See other posts from Stack Overflow
or by NKing253
Published on 2011-01-06T22:51:17Z
Indexed on
2011/01/06
22:54 UTC
Read the original article
Hit count: 118
I have 4 tables -- store, catalog_galleries, catalog_images, and catalog_financials
.
When I traverse the relationship from store --> catalog_galleries --> catalog_images
in other words: store.getCatalogGallery().getCatalogImages()
I get duplicate records. Does anyone know what could be the cause of this? Any suggestions on where to look?
The store
table has a OneToOne
relationship with catalog_galleries
which in turn has a OneToMany
relationship with catalog_images
and an eager fetch type. The store
table also has a OneToMany
relationship with catalog_financials
.
© Stack Overflow or respective owner