• Post Reply Bookmark Topic Watch Topic
  • New Topic

URGENT:regarding ejb of type CMP

 
pjoshi_blr
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have one database table A.In A i have coloumns which are foreign key and are nullable also for eg BID which is of type int in entity bean and NUMBER in database. In the entity bean in method called setA()when i do not set this variable(BID) whose corresponding coloumn type is a nullable foreign key database ,and now if i call this method setA() i get integrity constraint violated error. This is comming because the default value for a member variable in JAVA is zero for all int types. In case of Bean Managed persistance i used to check the value of this variable ..if it is zero ..i used to execute setNull() method. But Now what should i do for Container Managed Bean.
 
Frank Carver
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"pjoshi_blr",
The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at http://www.javaranch.com/name.jsp .
We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name. Please log in again with a new name which meets the requirements.
Thanks.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!