Hi,
Yes, we did intend to allow comparison of embedded objects as outlined in
4.4.4, but the grammar does not seem to have been updated to reflect it.
We will either have to modify the grammar or change 4.4.4 to back out of
the embedded object comparison support.
Depending on how messy it makes the EJB QL grammar we may choose to pull
back the embedded comparison from EJB QL since there is always a workaround
of navigating through the embedded object to the embedded state fields.
(Linda, we might want to check with the group on this question, though.)
-Mike
> -----Original Message-----
> From: Linda DeMichiel [mailto:Linda.Demichiel_at_Sun.COM]
> Sent: Tuesday, January 03, 2006 10:48 AM
> To: Michael Bouschen
> Cc: Mike Keith; persistence_at_glassfish.dev.java.net
> Subject: Re: EJBQL: question about state fields of an embedded class
> type
>
>
> Michael,
>
> Happy new year!
>
> Michael, Your understanding of how it is defined
> is correct.
>
> Mike, what do you think -- should we extend this
> to support direct comparison of embedded objects,
> or hold off?
>
> Linda
>
>
> Michael Bouschen wrote:
>
> > Hi Linda, hi Mike,
> >
> > Happy New Year!
> >
> > I have a question about embedded objects in EJBQL: does EJBQL allow
> > comparing of embedded objects? Suppose class Customer has a property
> > embeddedCountry annotated as @Embedded of @Embeddable type
> > EmbeddedCountry. The following EJBQL query compare the
> property with a
> > parameter:
> > SELECT c FROM Customer c WHERE c.embeddedCountry = :param
> >
> > I read chapter 4.4.4 Path Expressions that I can navigate through an
> > embedded object. But a path expression must end in a simple
> state-field
> > which cannot refer an embedded object. Is this correct?
> Then the above
> > query would not be valid.
> >
> > Regards Michael
>