-
Notifications
You must be signed in to change notification settings - Fork 127
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
Request: Support the Immutable Entities #465
Comments
If you want to get some inspiration, I think this is the PR where it was it was implemented in System.Text.Json. I linked to the file which seems like a good starting point for the implementation, as the PR is rather noisy. |
@mikependon FYI - this also seems to be required on Insert operations as well. |
@isaacabraham , for as long as you are passing the models, the compiler reflects all the properties that are readable. I would assume that immutable classes should be working by default. However, RepoDb insert operation is automatically setting back the PK/Identity value to the model after the operation, it seems to fail it there. In anyway, the PK/Identity value is also returned by the method itself, you can process afterwards. Btw, which case do you think it will fail? |
It fails on the |
@isaacabraham - this is noted. FYI, this user story has been pinned and is next in line, will be a part of the next version beta release, together with the other F# related request #499. I will look at this and make sure it is covered by the Integration Tests before the beta release. |
This has been fixed and is now available at RepoDb v1.12.3. Closing this incident ticket now. |
Currently, RepoDb does not support an immutable classes when fetching the data from the database. This is true to all fetch operations like Query, QueryAll, BatchQuery and/or even in the ExecuteQuery method.
See the sample code snippets below:
Note: In F#, by default, the classes are immutable and that the developers need to explicitly specify the
CLIMutableAttribute
to make it work.More information will soon to be placed here.
The text was updated successfully, but these errors were encountered: