Skip to content

fix writable changes#4525

Merged
greg-rychlewski merged 5 commits into
elixir-ecto:masterfrom
greg-rychlewski:writable_fixes
Oct 11, 2024
Merged

fix writable changes#4525
greg-rychlewski merged 5 commits into
elixir-ecto:masterfrom
greg-rychlewski:writable_fixes

Conversation

@greg-rychlewski

@greg-rychlewski greg-rychlewski commented Oct 11, 2024

Copy link
Copy Markdown
Member

Closes #4524

The complexity comes from the fact that we want changes in virtuals to show up in the returned struct but not changes in read-only fields. So we need to filter twice: once to remove read only fields but not virtuals. And then right before the db operation to filter out virtuals again.

Comment thread lib/ecto/repo/schema.ex Outdated
Comment thread lib/ecto/repo/schema.ex
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 this pull request may close these issues.

field/3's :writable seems to ignore the :insert option

2 participants