CDT Write to Data Store error: primary key "doesn't have a default value"

I created a CDT mapped to a data store entity with an auto-generated primary key (field name = "id").  I have a process that inserts one new instance of the CDT each time it runs.  The first two executions created two entries in the data store as expected.  The third and subsequent tries failed to insert, and produced this error message:

Details:  An error occurred while trying to write to the entity “CB_PWDBW” [id=b20cef01-aa95-4382-84eb-14de73b1a967@4057, type=CB_PWDBW (id=2778)] (data store: CB Data Store). Details: org.hibernate.exception.GenericJDBCException: could not insert: [CBPWDBWDT1716]: java.sql.SQLException: Field 'id' doesn't have a default value Data: TypedValue[it=2778,v={Bainwright Corporation,9998887776665,1,1,0,0,1,{,Chicago,IL,,USA,},<null>}]

I'm puzzled by this error, as the field"id" is defined as a primary key, with the auto-generate option checked:

Any help would be appreciated.

  Discussion posts and replies are publicly visible

Parents Reply Children
  • Bhanu, I enabled the auto-generated primary key when I first created the CDT. I am also NOT assigning anything into the primary key field before the Write to Data Store Entity step.

    Also, just in case the DB is Oracle, I changed the primary key name from "id" to "partyId", saved that, confirmed the data store is using the updated CDT. Even so, trying to add new entries is failing, giving the same error as before.