Open mayel opened 2 months ago
Hi @mayel ,
I've never come across this issue before. What kind of error do you get? Perhaps we can simulate the scenario in a test and then create a solution/PR for this edge case scenario.
Here's a basic reproduction which results in the following compilation error: https://github.com/bonfire-networks/paper_trail/tree/custom-type-repro/example
== Compilation error in file lib/version.ex ==
** (ArgumentError) unknown type Needle.ULID for field :item_id
(ecto 3.12.3) lib/ecto/schema.ex:2491: Ecto.Schema.check_field_type!/4
(ecto 3.12.3) lib/ecto/schema.ex:2053: Ecto.Schema.__field__/4
lib/version.ex:18: (module)
Hi, thanks for merging my recent PR :) It's great that we can configure the type of ID used for
item_id
, but an issue for us is that it doesn't seem to work for types that aren't built-in to Ecto (such asNeedle.ULID
from https://www.hex.pm/packages/needle_ulid). What would be a good approach to make this possible (without simply adding such libraries as an optional dependency)?