farzad wrote:
I can't think of any other way but that does not mean there is no other way. I would also like to know if this can be handled in a less painful way.
Farzad-
The scenario goes something like this:
Take a look at class A I posted before and then take a look at C below.
class C {
@ManyToOne(...)
@JoinColumn(name = "bar")
private A a;
}
I am trying to load class C that is mapped to a table.
When "C" gets loaded it loads "A" and "A" loads "B".
I want to control loading of B in A as for a particular type there are 100's of B.
I want an HQL or something thru which I want to take control over B's loading.
I am clueless as to how to address this as I am relatively a new Hibernate user.
Your experience or knowledge if you share with me will be really helpful.
Thanks