When I do this I get an error that says “giving a struct to Repo.insert_or_update/2 or Repo.insert_or_update!/2 is not supported”. When I use just insert/2 I can directly pass a struct.
Is it no longer possible to use this function without a changeset?
I have tried my code with versions 2.1.1 and 2.1.4 of ecto.
Thanks, do you know if there is anyway to just overwrite DB entries. That is what I am looking to achieve. The logic I have does not rely on changesets
@Crowdhailer: casting and validating - especially when you receive data from user or if source data have edge cases
You can see it when scraping data from lots of sites. Generally you expect that thousands of info pages have all info that you require, but for example some data could be missing (just not entered by user/admin).