Android ORM released
14 May
So for a while now I’ve been working on a persistence layer for Android in the form of an active record style ORM. It’s been pretty successful in making database tasks a breeze while writing Android apps.
There are two apps on the market which use ActiveAndroid: Wootsi Lite and Pickrand. Wootsi Lite is a Woot notification app and Pickrand is a sample app (source) which picks random items from categories you create.
ActiveAndroid is available at https://www.activeandroid.com/. You can download a trial and the sample project.
Go check it out!
Does it not support floats? I added an issue in the tracker.
@Ian
Thanks for pointing this out. There was an issue with primitive types checking for a superclass. This issue is resolved and an updated jar has been made available.
Thanks for the quick fix! I’ll be sure to try out the latest version tonight.
No problem.
One thing I thought of when trying to replicate this, is that maybe you had changed your model. This was not the case, however, it is a good note to make since I haven’t documented it yet. If you ever change your model, be sure to increment AA_DB_VERSION in the manifest.
If I update the data model, keeping AA_DB_VERSION equal to 1, then wipe the emulator data before running, everything should be gravy, right?
Correct. Changing AA_DB_VERSION informs AA that the model has changed, which then updates the sqlite database. If you clear the emulator data then there is no need to update the db version.
Probably best to only update the db version when the schema changes for production versions I guess.
Also, you can post questions here so others can see them http://tracker.activeandroid.com/projects/activeandroid/boards