I've been trying to tweak this to get it working for a while now and
I've had no luck at all.
First off I create two classes
@PersistenceCapable(identityType = IdentityType.APPLICATION,
detachable = "true")
public class ServerContent implements Serializable {
private static final long serialVersionUID = 7230645578648036546L;
@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private Key id;
@Persistent
private int rating = 0;
@Persistent
private Text widgetContent;
@Persistent
private String user;
@Persistent
private Date date;
@Persistent
private String title;
@Persistent(mappedBy = "parentKey")
@Element(dependent = "true")
private List<ServerComment> comments = new
ArrayList<ServerComment>();
And the second class
@PersistenceCapable(identityType = IdentityType.APPLICATION,
detachable = "true")
public class ServerComment implements Serializable {
private static final long serialVersionUID = 7577060064503658111L;
@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private Key id;
@Persistent
private ServerContent parentKey;
@Persistent
private Text content;
@Persistent
private Date date;
@Persistent
private String user;
@Persistent
private boolean approved;
@Persistent
private int rating;
I have a method which will create a comment on some content. The Web
page updates correctly but the call to save ServerContent never works.
I get a silent failure in by AsyncCallback and it throws a
com.google.gwt.user.client.rpc.SerializationException with the details
null and stacktrace null.
I have saved the parent class with an empty set of ServerComment
When I add new ServerComments to by ServerContent class and then try
and save the parent, the error is thrown. I've been trying to get
around this for over a day now! any help is much appreciated thanks!
--
You received this message because you are subscribed to the Google Groups
"Google App Engine for Java" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-appengine-java?hl=en.