curioustolearn
Repo.load does not assign a value to virtual fields
Hello,
I have results from a raw SQL query (using Postgres). I am trying to use Repo.load to map the results to an existing schema in my application. All columns are mapped except one column that is a virtual field. The column exists in the query result (as a string because it is from a raw query) and has values in each row. There is a 2018 post here, but it is not conclusive. Someone said that it is a bug if this happens. Anyone knows if this bug has been fixed? If not what is a good workaround?
I am using {:phoenix_ecto, "~> 4.5"}, {:ecto_sql, "~> 3.13"}`.
First Post!
curioustolearn
I would appreciate some advice from those who have experience. Should I just abandon the idea of trying to load it into a schema and use standard maps instead for this use case?
Thank you.
Last Post!
curioustolearn
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #elixirconf-us
- #advent-of-code
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #hex









