Hibernate, Dataview and joining two classes (tables)
I am using Hibernate, Dataview, and I would like to show list objects in dataview.
List of objects has an reference to another class with list of details for each object. In order to communicate it easily, I would give an example:
private Set<Address> address = new LinkedHashSet<Address>();
this is connected in hibernate like
foreign-key="FK_ADDRESS_CLIENT_ID"/> <one-to-many class="model/stakeholdersPartners.Address"/> </set> ....
Now I have one issue. When I pass this list of objects to dataview it is presented in a way that one client is repeated number of times that is equivalent to the number of addresses it has. This is due to "join" type of fetch type / how I understood it.
I have few ideas how to solve this, but non of the ideas I don't like, and I don't know what is the best practice to handle this.
I don't know what is the best practice here and how to handle it? Any ideas?