First, as I understand it, the @Column annotation defines the actual database column name but has no bearing on how the ORM tool identifies this column in the JPQL query language.
@Column(name = "peter") public String getHugo() This entity's column is "Hugo" when you identify it in your JPQL queries. "peter" is the actual name of the column in the database, and is used when the JPA implementation (Hibernate in JBoss EJB's case) builds the actual SQL that it sends to the database. So, I definitely see why u.peter fails - it should be u.hugo. I don't know what that first query is doing... "peter = :name". Turn on Hibernate SQL debugging (show_sql=true) to look at the actual SQL its issuing - that usually tells you alot about what's happening. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4021752#4021752 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4021752 _______________________________________________ jboss-user mailing list [email protected] https://lists.jboss.org/mailman/listinfo/jboss-user
