Joined: Wed Aug 27, 2003 8:35 am Posts: 6 Location: Tampa, FL
|
Thanks in advance for any tips or tricks for this issue!
I have an entity (Headline) which is described by Metadata. Metadata is implemented as a few different joined-sublcasses (Company, Publication, Region, etc..)
I've associated Metadata to Headlines through an associative entity (this is another issue altogether. Perhaps someone can suggest a better way to perform this association as it seems unweildy when it comes to writing HQL.)
What we're trying to do now is lookup Headlines that need to be removed. The condition for this purging is based on an attribute of Publication Metadata entities. But we can't figure out a way to filter a collection (Headline.metadata) for a specific type
e.g:
delete
from Headline hl
where hl.metadata.class = Publication pub
and pub.ttl > (sysdate - hl.published)
So this could be simplified by asking "Can one constrain a condition on a collection by subclass?" :-)
thanks!
|
|