this is pretty much normal behaviour !
the first query looks for all persons having a phonenumber like "052*" and returns these persons. when you do person.getPhones() all phones belonging to this ONE person are returned, no matter what the number is (at least one is like "052*").
hth jakob
Thomas Herbst wrote:
hi,
i have a 1:n relationship between Person an Phones.
if i make the following query to persons, i get all persons with a phonenumber like "052*"
crit = new Criteria();
crit.addLike("phones.number", "052*"); query = new QueryByCriteria(Person.class, crit);
thats ok!
but when if i make a
person.getPhones();
i get all phone numbers of the person and not only these numbers that match to the query criteria that i need!!
is there any solution??????
regards thomas
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
