I am using oracle with weblogic 6.1. I have one field viz. id (NUMBER datatype)in one of my database tables and that filed allows null value in it. Records in this table are being insterted through CMP 1.1 entity bean. My requirement is to have null values in this field for some of the records. Although I am calling create() method without any value for this field, 0 is insterted in database table.
Please suggest.
-
insert in nullable number field through CMP (2 messages)
- Posted by: Gopal Sharma
- Posted on: September 15 2003 09:00 EDT
Threaded Messages (2)
- insert in nullable number field through CMP by Paul Strack on September 15 2003 11:02 EDT
- insert in nullable.... by Gopal Sharma on September 16 2003 12:54 EDT
-
insert in nullable number field through CMP[ Go to top ]
- Posted by: Paul Strack
- Posted on: September 15 2003 11:02 EDT
- in response to Gopal Sharma
Try this: make your CMP field type a primitive object wrapper instead of a primitive (Integer instead of int). Then set this value to null when you want a null value in the database. -
insert in nullable....[ Go to top ]
- Posted by: Gopal Sharma
- Posted on: September 16 2003 12:54 EDT
- in response to Paul Strack
Thanx Mr. Paul
It got resolved.