users@glassfish.java.net

Re: Named Query design thoughts

From: <glassfish_at_javadesktop.org>
Date: Mon, 29 Oct 2007 16:06:22 PST

I'm not part of an expert group, so I can only provide my $.02. Here is how I see it:
There is no place (other than orm.xml or some other mapping.xml file) to specify PU-wide annotations. So you need to put them somewhere, which is on one or more entities. You do not need actually to spread them accross several entities, but you can choose a designated one for that purpose. All named queries are scoped to the whole PU. As a PU can be used by any component - an EJB, a web app, an app client, or in a 'pure' Java SE app, all its data must belong to the PU itself, named queries included.

Regards,
-marina
[Message sent by forum member 'mvatkina' (mvatkina)]

http://forums.java.net/jive/thread.jspa?messageID=242803