-
Notifications
You must be signed in to change notification settings - Fork 128
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
Question: How to return Composite Primary Key in InsertAsync? #942
Comments
@biapar - it is unfortunate, the composite keys are not supported with RepoDB. It is also a part of our limitation page. |
I by passed using this code
|
Does it work? Pretty sure RepoDB could not handle the generated ID of composite keys. 😄 |
Works. It give me only the first field of the key. I'll tried again. |
I've the composite key
and the insert return me the first field of the table because I tried also with other table with other composite field and give me the first field of the table. |
Was not it a problem in your case? It should somehow return you the values of the composite fields (more than 1 field). |
Not in my case for this tables, for others yes, but it's important that the row will be saved. For me is not important to get the key of the insert because I know it and the 90% of time I try to not use the identity key. |
I've a generic SaveAsync
Called :
await MatrixAddonManager.SaveAsync<int>(MatrixAddon)
How to return a primary field that correspond to a composite primary key?
Thanks
The text was updated successfully, but these errors were encountered: