Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

R2DBC Composite Primary Key #1276

Closed
ko-ing opened this issue Jun 27, 2022 · 5 comments
Closed

R2DBC Composite Primary Key #1276

ko-ing opened this issue Jun 27, 2022 · 5 comments
Labels
status: duplicate A duplicate of another issue

Comments

@ko-ing
Copy link

ko-ing commented Jun 27, 2022

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 #574 and I guess the issue has not been completed.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jun 27, 2022
@linghengqian
Copy link

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.👀

@schauder schauder added type: enhancement A general enhancement in: r2dbc Spring Data R2DBC and removed status: waiting-for-triage An issue we've not yet triaged labels Jul 8, 2022
@ko-ing
Copy link
Author

ko-ing commented Aug 13, 2022

@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?

@linghengqian
Copy link

linghengqian commented Aug 13, 2022

I don't have much of an idea from this, I'm guessing maybe the bigger limitation comes from Spring Data Commons.

@mp911de
Copy link
Member

mp911de commented Sep 13, 2023

Closing as duplicate of #574

@mp911de mp911de closed this as not planned Won't fix, can't repro, duplicate, stale Sep 13, 2023
@SubhashChamara
Copy link

Any update here. still it cant be use pk with r2dbc or any way now.?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: duplicate A duplicate of another issue
Projects
None yet
Development

No branches or pull requests

6 participants