-
Notifications
You must be signed in to change notification settings - Fork 27
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
Multi-Part Composite Key causes "Find" Exception using tryFindEntity / updateEntity #131
Comments
This has been fixed in v6.0.6 The only caveat is that a composite key has to be an tryFindEntity<CompositeKeyEntity> db (fun (x : CompositeKeyEntity) ->
let key : obj[] = [| x.Key1; x.Key2; x.KeyN |]
key) |
Awesome, thanks, love the project and using it daily! |
Thank you, it's always great to hear when someone is getting some use out of it |
On rev-ing to 6.0.6 it appears the Ex: let myBlog = tryFindEntity<Blog> db id
// type of myBlog is now obj instead of Blog I think this breaks a lot of the docs here as well: https://efcore.github.io/EFCore.FSharp//How_Tos/Use_DbContextHelpers.html @simon-reynolds Any insight, should I create a separate issue? |
General setup:
Then try:
Or this:
Which causes this:
Not hugely impactful since
.Find()
can be used directly, but treatingkey
asobj
instead ofobj[]
means composite keys can't be used with the helper functions (and they are helpful in many cases).The text was updated successfully, but these errors were encountered: