Dzoukr/Dapper.FSharp

v3.0.0: Partial updates do not work with an anonymous record

katatunix opened this issue · 3 comments

I've just updated to v3.0.0 however partial updates do not work with an anonymous record. The set statement always requires the Entity type not the anonymous record.

No worry, I switched to use setColumn and it works. It is more type-safe :D

Oh, good to hear. In case you find something missing in v3 docs, please feel free to send a PR. 🙏

It looks like the update example in the docs still shows the old anonymous records update, but it should be changed to use the new style instead:

             update {
                for p in personsView do
                setColumn p.LastName "UPDATED"
                where (p.Position = 2)
            } |> crud.UpdateAsync