so I am trying to build a google app engine using servlets, filters etc. I have a java file that looks something like:
public class Idea implements Comparator<Idea> {
@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private Key key;
@Persistent
private User author;
@Persistent
private String content;
@Persistent
private Date date;
@Persistent
private Map<User, Boolean> positiveVotes ;
@Persistent
private Map<User, Boolean> negativeVotes;
public Idea(User author, String content, Date date) {
this.author = author;
this.content = content;
this.date = date;
this.positiveVotes = new HashMap<User, Boolean>();
this.negativeVotes = new HashMap<User, Boolean>();
}
but when I try to run my program, I get an exception stack beginning with:
Feb 13, 2010 5:01:23 PM com.google.apphosting.utils.jetty.JettyLogger warn
WARNING: /sign
java.lang.IllegalArgumentException: positiveVotes: java.util.HashMap is not a supported property type.
at com.google.appengine.api.datastore.DataTypeUtils.checkSupportedSingleValue(DataTypeUtils.java:145)
at com.google.appengine.api.datastore.DataTypeUtils.checkSupportedValue(DataTypeUtils.java:127)
at com.google.appengine.api.datastore.Entity.setProperty(Entity.java:280)
So, my question is why does it complain that java.util.HashMap is not a supported property type, and also what could I do to work around it. Thanks! hope someone replies soon.