contentful / vault

Easy persistence of Contentful data for Android over SQLite.
https://contentful.github.io/vault/
Apache License 2.0
85 stars 19 forks source link

How to map DateTime & Reference to the @Field properly #133

Closed kzotin closed 6 years ago

kzotin commented 6 years ago

Hi folks,

Can you please advise on simple question, how to map to map properly (haven't found such details in readme): 1) What java data type use for DateTime field?

2) We have Many references field, which accepts various data types. Should I set @Field List<Resource> and find out instance type during runtime?

Thanks in advance! ;)

mariobodemann commented 6 years ago

Hey,

those are great questions, like always ...

1) For DateTime, I recommend using Strings:

2) Many References

I hope that helps

kzotin commented 6 years ago

awesome, thanks

mariobodemann commented 6 years ago

You are very welcome ....