Hi all,
I have a group object. This object has a set of images.
I use this query to load all the images in a group where the images in that group has a certain width:
from group where uuid=? and images.width=?
This works fine just as long as there are images in the group. If the group has no images, then this wont work. The list of groups is empty, so I tried:
from group where uuid=? and (images.width=? or images is null)
When that query is run I get all kind of hibernate exceptions. I've even tried
from group where uuid=? and (images.width=? or images.size == 0)
That throws exceptions too. All I want is that this query also includes groups who's image set is empty:
from group where uuid=? and images.width=?
It seams as if I cant call a set directly in HQL. If so how can I get a list of groups where the images set is empty?
Thanks in advance,
Martyn
|