Open DunetsNM opened 5 years ago
We have the exact same problem. Sad to see no progress on this issue. @DunetsNM how did you work around this?
@tskj I didn't find a workaround, ended up with different type provider (FSharp.Data.SqlClient) which is very different by design to make a fair comparison with this one, it embraces raw T-SQL instead of abstracting away from it. Worked alright for my use cases.
Description
(MS SQL SERVER) I have many tables with TIMESTAMP columns, computed columns, columns with default values. Most of the tables have auto-incremented (identity) primary key.
I expect that entity will contain those values after record is created or updated.
When I save (create or update) the entity it doesn't query values of such columns.
Expected behavior
All server-side values retrieved on INSERT and UPDATE, not just auto-increment primary key on INSERT. Should be easy to implement using "INSERT ... OUTPUT" or "UPDATE ... OUTPUT" synthax
Actual behavior
At the moment SQLProvider updates only auto-incremented primary key for new entities (generated SQL is "INSERT ... OUTPUT ..." )
Known workarounds
Related information