Yuriy Dubyna
Yuriy Dubyna

Reputation: 92

Spring-data-neo4j-4 Relationships common properties

i'm wondering if there is a way to specify a list of common properties for relationships withou defining new RelationshipEntity every time

Upvotes: 1

Views: 49

Answers (1)

Luanne
Luanne

Reputation: 19373

You can define the common properties in an abstract class, making sure that the @RelationshipEntity annotation is defined on the subclasses.

However, that still doesn't take away the fact that you could potentially have many @RelationshipEntity subclasses. I'm assuming this is what you mean, but in case not, please edit your question to add more info/an example

Upvotes: 2

Related Questions