Hi,
I have a class called
Person. This class has a property called
stateVisits like this:
Code:
private List<StateVisit> stateVisits;
A
StateVisit would have a
State property.
A
State would have
code and
name properties.
Now I am trying to search for all
Person(s) who have visited
MD. In my Restrictions in my
HibernatePersonDao, I use this, but it doesn't work.
Code:
Restrictions.eq("stateVisits.state.code","MD");
It would throw me the error that it could not find property
stateVisits.state.code in
Person. Should it be
stateVisits.stateVisit.state.code instead? With the return type
List<StateVisit>, it complicates things a bit for me.
Any help would be greatly appreciated it.
Johnny[/b]