Are you able to store a HashMap within an embedded class on App Engine? I have the following Class:
@Persistent(serialized = "true")
@Embedded
private Stats stats;
@PersistenceCapable
@EmbeddedOnly
public static class Stats implements Serializable {
private static final long serialVersionUID = 1L;
@Persistent(serialized = "true", defaultFetchGroup="true")
private Map<String, Integer> requests;
public Stats() {
requests = new HashMap<String, Integer>();
}
}
However, when I attempt to add an item to the HashMap and persist it I get the following error:
Specified class class com.google.appengine.api.datastore.Blob is not persistable
I know you can successfully use a HashMap in a "normal" class but can they be used in embedded Class's also?
Thanks
I haven't tried it with an Embedded class, but my Maps inside JDO objects needed additional FetchGroup annotations on the containing class...
and we had to add this class with getFetchPlan() when opening our DataManager...