I am getting this exception while deleting record from screen, This is because current entity is having field ID which is having a foreign key as SubID in another table.
So If I delete SubId first then it will work but how can I remove the dependency of FK so that I can delete it directly from the screen?
I am getting below error while setting on delete to cascade:
Execution failed for task ':LOA-global:enhance'.
> Process 'command 'C:\Program Files\Java\jdk1.8.0_161\bin\java.exe'' finished with non-zero exit value 1
@OnDelete and @OnDeleteInverse annotations affect only entities implementing SoftDelete interface. For hard-deleted entities the @OnDeleteInverse annotation indicates to Studio (since v.6.7) that it should generate an appropriate cascade clause for the foreign key.
Your entity seems to be imported from an existing database, so how to create such foreign key in your table depends on how you work with the DDL of this database.
By doing so (Enabling Soft Delete and using annotation @OnDelete on foreign key)
I am getting below exception: SQLServerException: Invalid column name 'DELETE_TS'.