g-loc wrote:
hi, i have two tables, similar to the classic Products and Departments, where a field in the first table is a foreign key for the other table.
[..]
but i have a problem: whatever value i use for departmentid, all the records are returned, but the data are stored correctly.
how can i solve this problem?
Don't use example queries, because it says in the documentation that it ignores any references:
Quote:
Version properties, identifiers and associations are ignored.
right here:
http://www.hibernate.org/hib_docs/core/ ... a-examples
But it should work with a eq Restriction.