Hi,
What is the best way to design a view for a Java/Hibernate Application for the following scenario:
There is Entity A that has one to many relation with Entity B, Entity C and Entity D.
There is a need to show all the relations of Entity A in a single Table in the UI.
Does it make sense to create a database view and map that with hibernate.
or
Have all the logic in Java and populate a POJO with the results from multiple queries done via Hibernate ?
In the first case, if views are used, then is such a view Possible ? I have been unable to find info on creating views with a structure such as Entity Id, Component Id, Component Type ( where Component Id and Component Type would have values from Entity B,C,D).
Is there something that I am doing fundamentally wrong ?