Two level inheritance and sql integritiy violation error


I’ve created a sample project given the following diagram07

Also created the generic UI’s for for ExecutiveAirport and Terminal

Tried to create a new entity for Executive Airport and a Terminal and getting the following error as seen below


This error does not reproduce if the Entity is created from within Airport Generic UI (first level inheritance)

Did I do something wrong?

I’ve attached project source code as well (85.1 KB)

Hi Ronald,
Thank you for your sample project.
As I see the “JOINED” inherittance strategy is used. So it seems you are facing this issue: Could not save Composition when master-entity is inheritted with the "joined" strategy · Issue #1013 · cuba-platform/cuba · GitHub.

If it is suitable for you, select another inherittance strategy.
But take note that there is also an issue in Studio, and if you choose “TABLE_PER_CLASS” remove “FK_BUILDING_EXECUTIVE_AIRPORT_ON_ID” and “FK_BUILDING_AIRPORT_ON_ID” constraints manually.

thanks, will it work if project is set to 6.9.1 version?

In 6.9.1 the issue also occurs. It will be fixed in some of the future releases.

thank you :slight_smile:

please consider setting this a priority, since IMHO this is a core functionality of cuba platform