SQl integrity violation

A : parent entity
B: child entity.
Analysis code : entity
c is an attribute in B, composition one to many. , analysisCode.
whenever there is an attribute in child class which is composition,
we face sql integrity constraint violation , foreign key no parent error.
SQLIntegrityConstraintViolationException: integrity constraint violation: foreign key no parent; FK_EMS_ANALYSIS_CODE_ON_PARENT table: EMS_ANALYSIS_CODE

how to overcome this ?

Hello @meera.c

Could you describe the case in mode details please? Please share demo project to investigate the problem if possible


Demo project for clarification.

  1. entity Organization : parent hierarchy : joined
  2. entity Orgunit : child class of organization.
  3. entity branch. attribute in org unit : compostion
  4. entity location : association in all entities listed above.
    when i try to create Orgunit along with branches and save it, i get this sql integrity error, foreign key no parent2019-12-13

the project folder is big even after zip, will try to scale down further and upload sample project.

You can run the following Gradle task to compile project archive:

gradlew zipProject


Thank you so much for the response.DemoSql.zip (95.9 KB)