urcoilbisurco / android-active-record

Automatically exported from code.google.com/p/android-active-record
0 stars 0 forks source link

return value of save() function does not reflect documentation #11

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create two new entities that are of the same type. (entity1, entity2)
2. Insert entity1, then modify one of it's values
3. Save entity1 and entity2 and look at their return values

What is the expected output? What do you see instead?
entity1 will return 1 since that is how many rows were affected.  Meanwhile 
entity2 will return a different value (say 1000) since that is it's rowId in 
the database.

Instead we should see that on save() of entity2 that it should return the total 
number of rows since every row was affected.

What version of the product are you using? On what operating system?

Please provide any additional information below.
This is just from looking at the code while working on making some mocks.  I 
can work on some  test cases to make this fail if you would like.

Original issue reported on code.google.com by c.saunde...@gmail.com on 21 Jan 2011 at 2:43

GoogleCodeExporter commented 9 years ago
The following patch fixes this issue.

Original comment by c.saunde...@gmail.com on 26 Jan 2011 at 12:47

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by Vladimir.Kroz on 29 Mar 2011 at 8:41