users@glassfish.java.net

Re: NamedQueries Scope?

From: <glassfish_at_javadesktop.org>
Date: Fri, 22 Jun 2007 10:59:27 PDT

Here is an example.

@Stateless
public class MyEntityBeanFacade implements MyEntityBeanFacadeLocal {

   @NamedQuery
      (
         name = "getData",
         query = "SELECT gu" +
                    " FROM MyEntityBean AS geb, IN ( geb.myUpdates ) gu " +
                    " WHERE geb = :x"
      )
      
   @PersistenceContext
   private EntityManager em;
[Message sent by forum member 'samdoyle' (samdoyle)]

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