Hi Christian,
Thanks for reply. So if Event has other Sets like Ticket, then we need to provide another method as Event e1 = getEventWithTickets(eventId) in the DAO along with Event e2 = getEventWithMarkets(eventId) to initialize different Set. Can we merge these two events e1, e2 so one of them have all the Set initialized by like e2.setTickets(e1.getTickets())?
Another question is about the data structure returned to web tier. If the objects graph is complex, is it a good idea to provide another POJO to contain these relations? For example, Event has Set of Markets (which is loaded by join fetch), each Market has a Set of Orders, what is a good way to model this data structure so web tier can display it directly? Have you had this kind of situation before?
Thanks.
Min
|