persistence@glassfish.java.net

Re: Question about constructor expression in the Java Persistent query language

From: Linda DeMichiel <Linda.Demichiel_at_Sun.COM>
Date: Thu, 02 Nov 2006 14:26:55 -0800

Hi Michael,

Given that single-valued-association-fields are supported here, I think
this should be as well. Looks like a simple omission...

Linda


Michael Bouschen wrote:
> Hi Linda, hi Mike,
>
> there is a forum post about a constructor expression in a Java
> Persistence query:
> http://forums.java.net/jive/thread.jspa?threadID=19642&tstart=0
> The user tries to pass an identification variable as argument of a
> constructor expression:
> SELECT NEW test.BobDisplay(b) FROM Bob b
> The query BNF defines a constructor item as a single valued path
> expression or an aggregate. Both does not allow an identification
> variable. Is there any particular reason for excluding an identification
> variable from a constructor argument?
>
> Thanks!
>
> Regards Michael