Sriphani,

I do think EJB QL can have something on these lines, but the spec
does not explicitly provide a standard/mapping.

For example, your table schema name could be "PersonSchema". In
this case, you could have a finder defined as:

public java.util.Collection findByAddress(Address anAddress)

and the EJB QL would probably look like (at least similar):

SELECT OBJECT(o)
   FROM PersonSchema o
   WHERE (?1.street1 IS NULL OR ?1.street1 = o.street1) AND
         (?1.street2 IS NULL OR ?1.street2 = o.street2) AND
         ....... etc

We did have the above feature in our EJB 1.1 implementation
and from what I understood from R&D, something similar for
our EJB 2.0 implementation as well.

What Object.equals() are you referring to? Normal checking
for equivalency in Enterprise Beans is done by isIdentical
method. The only Object.equals() I am aware of is for primary
keys - but that has nothing to do with DVC. But, if you
implemented a DVC, you're right - you would have to implement
[correctly] all the other contracts for normal object
inheritance; such as the equals() and the hashCode().

-krish


>Hi Krishnan,
>I have a query on the following.
>Can an EJBQL involve one of such DVC object attribute of a CMP bean in the 'select 
>condition' ?
>i.e., Will the Object.equals () work in this case if the DVC overrides it ??
>Performance put aside - Will this work ??
>Rgds,
>Sriphani.

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to