My GWT Entity contains an attribute myDescriptions
which is a list of 10 Strings with more that can have more than 500 characters.
When I try to give value to any element of the list, say element 3, two things can happen:
- myDescriptions.get(3) = stringWithLessThan500Chars;
-> Is done correctly
- myDescriptions.get(3) = stringWithMoreThan500Chars;
-> It is stored as element 9 (last) as datastore.Text
.
Any solutions for this? I tried creating myDescriptions as a list of datastore.Text
, but I cannot access them from EntityProxy
.
GAE has two string properties for Datastore types:
String
Text
. In your case the solution is to iterate through list and replace Text
with it's string value:
if(myDescriptions.get(x) typeof Text) {
String text = ((Text) myDescriptions.get(x)).getValue();
myDescriptions.set(x, text);
}