I’ve created a relation where the id
is aliased to event_id
. When I try to create new records by committing the changeset with data that has an event_id
value pre-populated, the value is not persisted to the id
column (get a SQL null violation exception).
class Events < ::ROM::Relation[:sql]
schema(:event_store_events, as: :events, infer: true) do
attribute :id, ::ROM::Types::String.meta(alias: :event_id)
primary_key :id
end
end
Is it not the expectation that the changeset commands will write to the original attribute name (SQL column)?
Thanks.