This content has been marked as final.
Show 1 reply
-
1. Re: EJB QL Underscore in column name
ant Sep 9, 2004 9:20 AM (in response to annapurna)The names used in EJB QL are the ones that you define as getter an setter for the specified column. The mapping between the getter/setter and the column name is done in the ejb-DD ejb-jar.xml.
Using XDoclet it might be:/**
* @ejb:persistence column-name = "USER_ID"
* @ejb:interface-method view-type="local"
*/
public abstract Long getUserId();
/**
* @ejb:interface-method view-type="local"
*/
public abstract void setUserId(Long userId);
Then the EJB QL looks like:SELECT object(a) FROM user a where a.userId = ...