byzhang / terrastore

Automatically exported from code.google.com/p/terrastore
Other
0 stars 0 forks source link

The signature of MergeDescriptor.removeFromArray is not the same as MergeDescriptor.addToArray #183

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The signature of MergeDescriptor.removeFromArray(String arrayName,  
List<String> values) is not the same as MergeDescriptor.addToArray(String 
arrayName, List<Object> values)

Original issue reported on code.google.com by t...@sics.se on 25 Aug 2011 at 2:37

GoogleCodeExporter commented 9 years ago

Original comment by sergio.b...@gmail.com on 18 Sep 2011 at 9:45

GoogleCodeExporter commented 9 years ago
Hey, you should have changed the removeFromArray, not addToArray ! Now 
you can only add strings to arrays! It was better before...
/Tomas

Original comment by t...@sics.se on 21 Sep 2011 at 11:55

GoogleCodeExporter commented 9 years ago
Nope: removing from arrays through merge updates only works with strings (see 
http://code.google.com/p/terrastore/wiki/Developers_Guide#Merge_update), so I 
changed the addToArray method to be consistent (since you can always convert 
from string to numbers/booleans by yourself).

In other words, the previous version was actually *correct*, but misleading.

Original comment by sergio.b...@gmail.com on 21 Sep 2011 at 12:02

GoogleCodeExporter commented 9 years ago
OK. That might be true, but before I could add an object and it was 
added correctly. I did have to create a work around to remove an object. 
But now, I cannot add an object automatically to an array. So that was 
*not* an improvement from my point of view.

/Tomas

Original comment by t...@sics.se on 21 Sep 2011 at 12:10

GoogleCodeExporter commented 9 years ago
Got it: I can certainly revert back to the previous version and live with the 
API inconsistency, I just thought it was actually of some help.
So I'll revert back and release a new version between today or tomorrow: is 
that okay for you?

Original comment by sergio.b...@gmail.com on 21 Sep 2011 at 12:15

GoogleCodeExporter commented 9 years ago
That is very much OK.
/Tomas

Original comment by t...@sics.se on 21 Sep 2011 at 12:21

GoogleCodeExporter commented 9 years ago
Done, reverted back and released 2.4.1.

Original comment by sergio.b...@gmail.com on 26 Sep 2011 at 3:48