You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 17, 2018. It is now read-only.
In the case of something like dm-types Csv or anything that essentially results in a String/Text the dm-migration tries to look up the type for that column from a type_map. This happens either by way of looking up the property class itself or by calling dump_class and alias for dump_as. dump_as is an option set on the property (akin to load_as, but that's a class method for the extended type itself).
I'm proposing that dump_as either infers the class that it should dump as (from the property it inherits from maybe, just call super if the option isn't set?) or, at the very least, it does not attempt to use load_as for the dump_as. Given most types are a mapping from something more complex (like an Array) to something simpler, it seems unlikely that load/dump would be the same type.
I'll send a PR if there is one that is preferred. But, if you find this page and you're hitting this problem, start by setting dump_as option on your property using a dm-type.
The text was updated successfully, but these errors were encountered:
Maybe I was hoping that there could be a dump_as on the custom type just like there is a load_as. Rather than setting it with an option on the property. I guess I'm not sure where the change took place in dm-migrations that broke custom types base type.
In the case of something like dm-types
Csv
or anything that essentially results in a String/Text the dm-migration tries to look up the type for that column from atype_map
. This happens either by way of looking up the property class itself or by callingdump_class
and alias fordump_as
.dump_as
is an option set on the property (akin toload_as
, but that's a class method for the extended type itself).I'm proposing that
dump_as
either infers the class that it should dump as (from the property it inherits from maybe, just call super if the option isn't set?) or, at the very least, it does not attempt to useload_as
for thedump_as
. Given most types are a mapping from something more complex (like an Array) to something simpler, it seems unlikely that load/dump would be the same type.I'll send a PR if there is one that is preferred. But, if you find this page and you're hitting this problem, start by setting
dump_as
option on your property using a dm-type.The text was updated successfully, but these errors were encountered: