org.hibernate.exception.ConstraintViolationException thorws when I try to update a parent CDT with an ID = 0

Hi,

I am encountered a weird situation: I got a CDT1 with muti CDT2 as a child object, I can use writeToDataStoreEntity smart service to insert/update CDT1 successfully unless update an existing row with an ID = 0, I've test ID = 1, 2, 3 even -1, all updated successfully, I also can update CDT2 with an ID = 0, but got ConstraintViolationException when update CDT1 with ID = 0, anyone got any idea?

  Discussion posts and replies are publicly visible