Hi , I have the following source code:
@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class Customer implements IsSerializable {
@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private Long id;
@Persistent
private String name;
@Persistent
private Usuario admin;
.......
@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class Userimplements IsSerializable {
@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private Key key;
@Persistent
private String name;
.....
and I try to save as follows:
public boolean insertCustomer(Customer c, Usuer u) {
PersistenceManager pm =
PMF.getPmfInstancia().getPersistenceManager();
Transaction tx = pm.currentTransaction();
try {
tx.begin();
c.setAdmin(u);
pm.makePersistent(c);
tx.commit();
....
but when I retrieve data, the customer is saved but the associated
user not. Any idea?
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.