Skip to content

Set `state: :loaded` metadata on retrieved records.

Compare
Choose a tag to compare
@darrenklein darrenklein released this 10 Nov 15:39

When returning existing records, it is expected that the the metadata for such a record will include state: :loaded. Ecto provides a process callback function which other adapters use during the decoding process to map the data from the record into the returned struct, including this piece of metadata; however, the current decoding process for this adapter is not structured to make use of that callback, so this metadata is set by other means - this release handles this task.

Ecto metadata reference:
https://hexdocs.pm/ecto/2.2.6/Ecto.Schema.Metadata.html