You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just noticed that most repo mutating callback functions validate structs through the schema module's respective changeset/2, which is different than what happens when Repo.insert/2 is used. I'm not sure what to do in this case.
Should it validate all changes through changeset/2 or should they dangerously allow inserts directly, without caring with changeset validations (effectively delegating it to the respective functions)?
The text was updated successfully, but these errors were encountered:
I think it's wise to check how these functions differ in Ecto APIs (aka.: which ones validate changes w/ changesets and which do not) and replicate it in SwissSchema APIs.
Since it'll probably cause breaking changes, it's important to advertise, both in docs and social media, that a version bringing this change (probably v1.0.0) will be an API-breaking one.
I just noticed that most repo mutating callback functions validate structs through the schema module's respective
changeset/2
, which is different than what happens whenRepo.insert/2
is used. I'm not sure what to do in this case.Should it validate all changes through
changeset/2
or should they dangerously allow inserts directly, without caring with changeset validations (effectively delegating it to the respective functions)?The text was updated successfully, but these errors were encountered: