Contributor |
|
Joined: Sun Jun 26, 2005 5:03 am Posts: 51 Location: London, UK
|
Get's me half way there as I also need to restrict on properties that only exist on the subclass.
Think I've got it, but I don't know how general this is; this should retreive and order that contains a MusicalProduct...
select item.Order
from OrderItem item, MusicProduct mp
where item.Product = mp
and mp.IsrcCode = 'Fred'
You have to introduce the subclass explicitly as there doesn't seem to be a way of casting it to the subclass in HQL.
_________________ Paul Hatcher
NHibernate Team
|
|