Introducing DaoCompat: greenDAO on ObjectBox

Earlier this month, we released ObjectBox 1.0, a new superfast object-oriented database. Now, with DaoCompat, you can easily use the power of ObjectBox in your Android apps while keeping the greenDAO APIs.

Boost your App performance

Going forward you can also use ObjectBox’ modernized APIs. It works with Kotlin and reactive queries (with or without RxJava 2). Also, object relationships are much more powerful with change tracking and intelligent updates.

For greenDAO users it is an easy switch: With DaoCompat you can continue to use familiar classes from greenDAO like DaoSession and individual DAOs. Just use the package
org.greenrobot.daocompat instead of
org.greenrobot.greendao. Initialization to get the DaoSession is also trivial:

Java

1

2

boxStore=MyObjectBox.builder().androidContext(this).build();

session=newDaoSession(boxStore);

Technically, DaoCompat is a thin layer on top of ObjectBox. It’s open source under the Apache 2 license.

The Future of greenDAO

Since greenDAO was released in 2011, it has been the performance leader in Android ORM and performance was always the primary driver behind greenDAO. Performance-wise, we hit a wall with SQLite because SQLite became the only remaining bottleneck. This is the very reason why we developed ObjectBox because we believe that the future of apps will not include SQLite. Still, we will continue to maintain greenDAO. At the same time we will put much more effort into ObjectBox and exciting new features around it. In that way, look at DaoCompat as a convenient tool to upgrade your database.