[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Custom ejbCreate() generates bad INSERT-Statement (4.0.2)

Oyabun do-not-reply at jboss.com
Thu Aug 3 10:05:25 EDT 2006


Hi

Given the following EntityBean:


  | Person
  | -------
  | Name
  | Gender
  | Age (ORACLE DEFAULT 18)
  | 

and the following custom ejbCreate() call:

ejbCreate("Alex","m")

why is the generatet INSERT - Statement like this:

INSERT INTO PERSON(NAME, GENDER, AGE) VALUES ("Alex","m",NULL)

when it should be:

INSERT INTO PERSON(NAME, GENDER) VALUES ("Alex","m")

The Oracle Database could insert the DEFAULT Value by itself but JBoss attaches the NULL value. Can someone confirm this or link me to a documentation? Thanks.

--
Alex

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

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



More information about the jboss-user mailing list