[jboss-user] [JBoss Seam] - how to make a ejbql query from an entity bean ?

vlaugier do-not-reply at jboss.com
Sun Dec 2 12:54:42 EST 2007


I would like to perform ejbql queries from the entity beans. This way I could customize my getters and add some very handy transient methods.

Is there a way to do this ?

I have tries to declare an entityManager in the different fashion :

EntityManager em; 
EntityManager em; 
EntityManager em; 

But I get 

  | Caused by: java.lang.IllegalArgumentException: @PersistenceContext may only be used on session bean or message driven bean components: employee

Does anyone has ever managed to do this ?



View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4109655#4109655

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4109655

More information about the jboss-user mailing list