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

Replace doesn't resolve correct id value #69

Closed
mickednk opened this issue Sep 23, 2022 · 3 comments · Fixed by #70
Closed

Replace doesn't resolve correct id value #69

mickednk opened this issue Sep 23, 2022 · 3 comments · Fixed by #70

Comments

@mickednk
Copy link

When doing a replace of an item the value "id" is resolved instead of the value of the property "id" if you haven't added an IdAttribute on the id property.

I think this is where the issue lies.

let getIdFieldName<'T> (item: 'T) =
    let idAttr = IdAttributeTools.findId<'T> ()

    match idAttr with
    | Some attr -> attr.GetValue(item).ToString()
    | None -> "id"
@aaronpowell
Copy link
Owner

Ha, yeah that's probably true.

I guess I need better test coverage 🤣

aaronpowell added a commit that referenced this issue Oct 17, 2022
@aaronpowell
Copy link
Owner

Got around to patching this, you'll find a build available here: https://github.com/aaronpowell/FSharp.CosmosDb/packages/530463?version=1.2.1-ci-3261757948

Can you verify @mickednk before I merge it?

@mickednk
Copy link
Author

It works for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants