Closed tillsc closed 8 years ago
This looks great. I'm going to try to get travis-ci running again. When I do, would you mind rebasing this against my fixes?
@tillsc Mind rebasing from master? I wanna see this run through CI 😄
crossing fingers....
Woot! Ready to merge?
Sure, why not? :)
Problem: All custom DataMapper::Properties (e.g. in dm-types) have database field types based upon their Ruby primitives. Especially Properties inheriting from DataMapper::Property::Text like DataMapper::Property::JSON have some problems with that behavior (since they will result in VARCARs instead of LOBs).
This commit adds logic to try to find a database field type based upon the superclasses of the (custom) property. Only if no superclass has a direkt mapping from
property.class
to field type the fallback to the Ruby primitive (returned by dump_as) will take place.This PR follows a cleaner approach then #54