R2DBC Composite Primary Key
Hi, I was wondering if there's any way I can implement composite primary keys on entities when using spring-data-r2dbc. If there's none, is there any plan for addition or is it okay to create PR for it?
I have searched for some issues and changes but only found https://github.com/spring-projects/spring-data-relational/issues/574 and I guess the issue has not been completed.
If I remember correctly, using single primary key is a requirement of the JPA specification. If Spring Data tends to follow the JPA specification, this is clearly an unsolvable problem.👀
@linghengqian
Thanks for comment!
I checked javax.persistence package which refers to jpa specification, and there is @IdClass that specifies a composite primary key for an entity. So, I thought jpa specification provides support for composite primary key.
Please comment back if I got it wrong. And also, I wonder if spring-data-relational repository is not right place to raise this issue?
I don't have much of an idea from this, I'm guessing maybe the bigger limitation comes from Spring Data Commons.
Closing as duplicate of #574
Any update here. still it cant be use pk with r2dbc or any way now.?