Jaguar-dart / jaguar_orm

Source-generated ORM with relations (one-to-one, one-to-many, many-to-many), preloading, cascading, polymorphic relations, etc
https://jaguar-dart.github.io
BSD 3-Clause "New" or "Revised" License
217 stars 52 forks source link

Use `Duration` Type as field or how customize serialising #145

Open rubiktubik opened 5 years ago

rubiktubik commented 5 years ago

Hello Community, i want to use jaguar_orm in flutter. When i use the Duration-Type i get an exception from in the generated *.jorm-File:

Field type not recognised: Duration!

When the Duration-Type is not supported. How can i customize the serialisation?

Regards rubiktubik

tejainece commented 5 years ago

@rubiktubik Durations will be supported in version 4.x.x which is being worked on.

rubiktubik commented 5 years ago

Thank you for the quick answer! Is there another way in the meantime?

tejainece commented 5 years ago

Use ignore to ignore duration field and add string getter and setter that will actually sets the duration field is one idea.