- Notifications
You must be signed in to change notification settings - Fork 373
Open
Labels
type: enhancementA general enhancementA general enhancement
Description
Hi,
I love the simplicity of spring-data-jdbc
, but sometimes it feels too restrictive compared to possibilities of JPA. I miss the @JoinColumn
feature.
Please let me describe my need for it
class Order { @Id String id; // technically, randomly generated value without _any_ business meaning, e.g. UUID String reference ; // some kind of business information encoded in the value and it is _unique_ (!) @MappedCollection Set<OrderItem> orderItems; // might be a better name compared to @JoinColumn //@MappedColumn @JoinColumn("reference") // <== not using the "id" field private Meta meta; } class OrderItem { @Id Long id; // technical id String orderId; // back reference to Order } class Meta { @Id String reference; String data; }
I have use cases, where relations are either based on that unique field/property/column or on another unique field/property/column.
I tried to use the NamingStrategy
to achieve my goal, but it didn't work either.
best regards
kap199297 and denniseffing
Metadata
Metadata
Assignees
Labels
type: enhancementA general enhancementA general enhancement