Setting a property to com.google.appengine.api.datastore.Entity
I have an entity which has property Person person(user defined object) so I wanted to setProperty("person", new Person()) however got an IllegalArgumentException "....Person is not a supported property type". It is a simple class with field String name and String country which implements Serializable.
class People{ Person person; }
I am trying to:
entityOfTypePeople.setProperty("person", new Person());
this is where I get "IllegalArgumentException ....Person is not a supported property 开发者_JS百科type".
Properties are always String objects (see http://download.oracle.com/javase/1.5.0/docs/api/java/util/Properties.html and http://leepoint.net/notes-java/io/30properties_and_preferences/10properties.html) as far as I know. I think you want to use java preferences not java properties (though to be fair, I don't know if GAE supports that or not).
精彩评论