I wouldn't recommend using Ektorp, especially if you are starting a new project. Although it does provide some O/R mapping, it has a lot more "moving parts" than the native java API, and we're not planning to officially support it. (eg, it's considered a community effort)
I know Jackson has some object mapping features that will make your life easier converting from POJOs <-> JSON Documents, and that's already being included as a core dependency on Couchbase Lite. On Fri, Feb 14, 2014 at 6:41 AM, Sascha Lüdecke <[email protected]> wrote: > I see that there is jacksond and on top of that Ektorp (APL 2.0 License) > which appears to be the ORM of choice here. I will look into that. > > > > ORMLite is especially useful to me since it > > > > a) is very commercial friendly (I work for a start up with limited > ressources) > > b) is not getting into my way by using annotations and not requiring to > subclass or implement anything > > c) has simple caching and allows to autorefresh foreign fields > > d) is light and works like a charm on android devices > > > > Still it would be nice to have a section in the documentation which > relates to that. Maybe even a simple example. > > > > Regards, > > Sascha > > > On Thursday 13 February 2014 09:51:18 Traun Leyden wrote: > > > Great question! > > > There's no OR mapper in Couchbase Lite Android yet. It's a lower priority > than getting the rest of the current API "surface area" working correctly > and being performant. > > > It's funny you mention ORMLite, because after doing a survey of the OR > mapping frameworks out there, that was the one that seemed the most > appropriate to look to in terms of design. One thing I liked is that their > annotation based approach doesn't interfere with existing class hierarchies. > > > One problem with OR mapping frameworks is that developers have so many > differing/conflicting requirements that it's almost impossible to create > one that everyone likes. I'm leaning heavily towards making this a > separate module rather than putting it in the core codebase, with the > expectation that community members would create forks that better meet > their own requirements. > > > Any other requirements/suggestions you have would be great to hear. > > > On Thursday, February 13, 2014, Sascha Lüdecke <[email protected]> wrote: > > Hi all, > > > is there any OR mapper like (e.g. like ORMlite) library which I can use > with CBLite on Android? > > > I would love to get more in touch with CBLite since I like the concept > behind it and the ability to sync with little or no effort. Currently all > my apps are using SQLite as a data storage and ORMlite as an OR Mapper. I > am quite confident with this concept since it provides me java native > datatypes and easy persistence of my object states. Still I would like to > be able to somehow exchange the current OR layer with something suitable > for CBLite. > > > Regards, > > Sascha > > > Disclaimer: I am new to CBLite and this might a noob question (maybe I > have just not understood the power and usage of jackson). > > -- > You received this message because you are subscribed to the Google Groups > "Couchbase Mobile" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/mobile-couchbase/96f12954-2666-4d4b-a5d7-162401586a3c%40googlegroups.com > . > For more options, visit https://groups.google.com/groups/opt_out. > > -- > You received this message because you are subscribed to the Google Groups > "Couchbase Mobile" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/mobile-couchbase/CACSSHCEwtwwQ_9K2vFAcbB%2BKsBQ7AMSZiFMkie6GdH6g_TcDfg%40mail.gmail.com > . > > For more options, visit https://groups.google.com/groups/opt_out. > > > > -- > You received this message because you are subscribed to the Google Groups > "Couchbase Mobile" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/mobile-couchbase/9048762.K6ChseCZeO%40slux > . > > For more options, visit https://groups.google.com/groups/opt_out. > -- You received this message because you are subscribed to the Google Groups "Couchbase Mobile" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/mobile-couchbase/CACSSHCHMY9vc9KbjGCJMhnuO9C0mjyeFALBUSY73S5O7eo%3D%2BHA%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
