hamiltop / rethinkdb_ecto

Shim library for using Ecto with RethinkDB. Not a full adapter.
24 stars 4 forks source link

Ecto virtual fields #15

Open dabaer opened 8 years ago

dabaer commented 8 years ago

When running insert/1 on a changeset, the shim does not appear to respect the virtual: true setting in the schema, and inserts the virtual fields with their data (eek) into the database.

Corkle commented 8 years ago

I'm having some trouble searching the Ecto docs to find at which point the virtual fields are actually stripped out. By the time Ecto.Changeset.apply_changes(changeset) is applied to return the model for insertion, the virtual fields are still present in changeset.changes.