I have a question regarding loading a graph of objects for return to the client. I have the following object graph
obj A has a 1:1 with obj B
obj A has a 1:n with obj C
obj B has a 1:n with obj D
obj B has a 1:n with obj E
obj B has a m:n with obj F
I need all of the data starting with object A and all of its associated collections. How do I structure a HQL query or a criteria query for this?
I started with:
list = HibernateUtil.getSession()
.createCriteria(A.class)
.add(Expression.between("someDate", date1, date2)
not sure what to put here, if I an reading correctrly I can only retreive 1 m:n collection, what about all the 1:n ones?
.addOrder("someDate")
.list()
Thanks for the help
|