Skip to content

Releases: mohammadaminha/sugar

Sugar Bugs are fixed

28 Oct 12:21
Compare
Choose a tag to compare
Orm Sugar bugs are fixed

As you know this library has some issues in android 7+ so I decided to fix them.
What was the problem ?
The "for loop" for creating tables in "SchemaGenerator" at the first app run wasn't working, Inorder to fix that and I created some structures in "SugarRecord" class and some methods in " SchemaGenrator" class.
These changes are done for creating and also modifying tables in applications run time.
When saving an object in "SugarRecord.save()" or "obj.save()" these codes run and check that if table does exist then do the operation, else create table and do the operation, this condition applies to update method too.
For example: when modifying a table in your database to adapte to changes in your new app version, the app automaticly checks fields in your insert or update operations and applies needed changes (add the table or column).
The most exciting feature added in this Fork is that code that requierd the changes in database runs automaticly after the changes are done, this avoids a crash and gets the job done.
When using this app you wont need to import "@Table" & "@Unique" interfaces in your table classes.
Even though there has been many changes in this Fork, you can easily replace this with the one you have without worring about any confilicts :smile: .
Good luck.