roscopeco / ormdroid

ORMDroid is a simple ORM persistence framework for your Android applications.
http://roscopeco.github.io/ormdroid/
Apache License 2.0
86 stars 24 forks source link

Schema Upgrades when Entity Changes #15

Closed shammer64 closed 11 years ago

shammer64 commented 11 years ago

Ross,

My team is testing ORMdroid for use in our project. So far we like what we see.

However, we have encountered an issue when adding fields to an existing Entity. As you probably already know, ORMdroid will throw an Exception when it encounters a field name that does not correspond to the underlying database table.

Ideally, there would be a feature to automatically (or on demand) add new fields to the underlying table as the Entity object expands. I could imagine calling something after initializing the ORMDroidApplication in a new version of the app.

Is there a means of triggering this sort of update in the existing ORMdroid library? If not, my team would be interesting in forking and contributing such a feature...based on any advice you may have.

Thanks, Scott

roscopeco commented 11 years ago

There is currently no support for this. I had a vague idea about some kind of versioning feature (maybe based on a class annotation) but so far I haven't gotten around to doing anything about it.

I'd be interested to see anything you guys implement, and would be more than happy to merge changes back in, assuming they didn't have a negative impact on the size or efficiency of the library.

shammer64 commented 11 years ago

Ross,

Thanks for your reply. We've since discovered ActiveAndroid and find that it meets our needs with respect to storage and versioning. Still, I think you've created a great library that I might consider for different projects.

Thanks, Scott

On Thursday, October 24, 2013, Ross Bamford wrote:

There is currently no support for this. I had a vague idea about some kind of versioning feature (maybe based on a class annotation) but so far I haven't gotten around to doing anything about it.

I'd be interested to see anything you guys implement, and would be more than happy to merge changes back in, assuming they didn't have a negative impact on the size or efficiency of the library.

— Reply to this email directly or view it on GitHubhttps://github.com/roscopeco/ormdroid/issues/15#issuecomment-26998184 .

Scott Hammer Hammer Consulting LLC shammer64@gmail.com

"Hey, careful, man, there's a beverage here!" - The Dude "Baseball is like church. Many attend but few understand" - Wes Westrum

roscopeco commented 11 years ago

No problem, glad you found a solution to your issue :)

ChristopheCVB commented 10 years ago

@roscopeco Can we reopen this issue and mark it as enhancement ?

Can you talk about the class annotation you've been thinking to accomplish that ? I'll be pleased to discuss some things about this with you ;)