Hi, 
I´m not sure if this or the "persistence" group is the right one.

I created a Query like this
erg = (List<User>) em.createQuery( "from User u where (u.peter = 
:name)").setParameter ("name", "pete").getResultList();
  |  and it wors as expected.
If I change it an introduce an alias 
erg = (List<User>) em.createQuery( "from User where (peter = 
:name)").setParameter ("name", "pete").getResultList();
  | and it works.
  | 
I get an exception
javax.ejb.EJBException: javax.persistence.PersistenceException: 
org.hibernate.QueryException: could not resolve property: peter of: 
com.entity.User [from com.entity.User as u where (u.peter = :name)]
  | 

what´s wrong?


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

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

_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to