Create a database with stORM api and an entity in it. Install this app and generate some data. Make sure that the rowId contains some negative values. In my case, I used hashcode of String object to generate the rowId for the object.
Change the entity schema and database version. Make sure that the upgradestrategy is set to BAKCUP_RESTORE
Upgrade the existing app with this new app. Now the data restore step fails with an exception.
What is the expected output? What do you see instead?
Expected: Smoother migration to new database schema and data being restored.
Seeing: Exception while importing data back to the db.
What version of the product are you using? On what operating system?
0.9.7
Please provide any additional information below.
The InsertHelper.execute() method was returning some negative rowId (-167847) in my case, which is fine. But there is a check to fail the db restore if this rowId is negative which is wrong.
The javadoc for InsertHelper.execute() will return -1 in case of failure. But the code checks for any value < 0 and fails the process.
From https://code.google.com/p/storm-gen/issues/detail?id=41
What steps will reproduce the problem?
What is the expected output? What do you see instead? Expected: Smoother migration to new database schema and data being restored. Seeing: Exception while importing data back to the db.
What version of the product are you using? On what operating system? 0.9.7
Please provide any additional information below.
The InsertHelper.execute() method was returning some negative rowId (-167847) in my case, which is fine. But there is a check to fail the db restore if this rowId is negative which is wrong. The javadoc for InsertHelper.execute() will return -1 in case of failure. But the code checks for any value < 0 and fails the process.