General J2EE: insert in nullable number field through CMP

  1. insert in nullable number field through CMP (2 messages)

    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.

    Threaded Messages (2)

  2. 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.
  3. insert in nullable....[ Go to top ]

    Thanx Mr. Paul

    It got resolved.