Joined: Fri Nov 09, 2007 6:15 pm Posts: 1
|
It appears that if you use @LazyCollection your @Where clause gets ignored.
I have a collection mapped in an entity called User that looks like this:
@OneToMany(mappedBy="user", fetch=FetchType.LAZY)
@LazyCollection(LazyCollectionOption.EXTRA)
@Where(clause="deleted=0 AND duplicate=0")
private List<Property> properties = new ArrayList<Property>();
if I call properties.size() I get a count that includes properties where the "deleted" attribute is true. If I leave out the @LazyCollection annotation and call properties.size() the count does not include those properties.
|
|