[jboss-user] [EJB 3.0] - Mapping String attribute in EntityBean to CHAR(size) in DB

henning@ikke.de do-not-reply at jboss.com
Thu Dec 14 04:57:27 EST 2006


I have a composite PK class that consists of {int, int, String, String}.
Both attributes of type String are mapped to CHAR(size) instead of VARCHAR2(size) in an Oracle DB.

My Problem:
The EntityManager's 
find(Class entityClass, Object primaryKey) method returns null instead of an EntityBean.

It all works if I handcode my EJBQL and insert the two Strings with trailing white spaces to match the size of the CHAR-Colums in the DB.

This is somewhat strange because a SQL select statement works fine without supplying trailing white spaces in the where clause.

Any suggestions other than changing to VARCHAR2??

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

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



More information about the jboss-user mailing list