Using a @ManyToOne relation in combination of an abstract class (@Inheritance) does not generate the @OnDelete action in the DDL

Description

I have several Entities which have a reference to the same instance of another Entity-Object like so:

My problem is I just want to delete cascade the instance `A`. The number of Entities referencing A is not known upfront (hence the class is abstract). The DDL generated of the concrete classes `C` and `D` does not contain the `OnDelete` action anymore, so I had to work around using `@JoinColumn` together with `@ForeignKey` lke so: @JoinColumn(foreignKey = @ForeignKey(foreignKeyDefinition="FOREIGN KEY (trance_id) REFERENCES m_trace(id) ON DELETE CASCADE"))

Environment

spring-boot-starter-data-jpa

Assignee

Unassigned

Reporter

Christian Kindler

Fix versions

None

Labels

None

backPortable

None

Suitable for new contributors

Yes, likely

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Trivial
Configure