Skip to content

Tags: mohammadaminha/sugar

Tags

v1.0.0

Toggle v1.0.0's commit message
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 😄 .
Good luck.

v1.0

Toggle v1.0's commit message
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 😄 .
Good luck.