Hi,

You can almost do this with a constant join:
http://openjpa.apache.org/docs/latest/manual/manual.html#ref_guide_mapping_notes_nonstdjoins

However, I believe that this currently only can be used for adding
constant value equality comparisons; I don't think that we support a
not-null comparison concept. It probably would be pretty
straightforward to add.

-Patrick

On 7/22/07, Christian Defoy <[EMAIL PROTECTED]> wrote:
Hello,

I am looking for a way to filter a set while loading it into an
object.  For example, if class Shape contains a reference to a set of
Drawings but the drawings are never deleted from the database but
retired instead.  How do I fill the attribute Shape.activeDrawings?

The JPQL-like way of doing this would be:

SELECT d FROM Drawing d WHERE d.shape.id = ? and d.retirementDate is null

but how do I create a mapping that does the same thing?

Thanks in advance!

Christian



--
Patrick Linskey
202 669 5907

Reply via email to