public SyncConfigResult create(){
SyncConfigResult retVal = null;
PersistenceManager pm = PMF.get().getPersistenceManager();
try {
SyncConfiguration syncConfig = new SyncConfiguration();
syncConfig.setAccount1(new Account(action.getEmail1()));
syncConfig.setAccount2(new Account(action.getEmail2()));
syncConfig = pm.makePersistent(syncConfig);
context.getSesion().setAttribute(SyncConfigResult.SESSION_ID,
syncConfig.getId());
retVal = SyncConfigActionHandler.buildSyncConfigResult
(syncConfig);
} finally {
pm.close();
}
return retVal;
}
On Oct 26, 11:08 pm, "Jason (Google)" <[email protected]> wrote:
> Can you post the code you're using to persist the SyncConfiguration and
> Account objects?
>
> - Jason
>
> On Fri, Oct 23, 2009 at 8:09 AM, Gerd Saurer <[email protected]> wrote:
>
> > I have a object mapped to the Datastore that looks like:
>
> > @PersistenceCapable(identityType = IdentityType.APPLICATION)
> > public class SyncConfiguration {
>
> > �...@primarykey
> > �...@persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
> > private Long id;
>
> > �...@persistent
> > private Account account1;
>
> > �...@persistent
> > private Account account2;
>
> > ......
> > }
>
> > @PersistenceCapable(identityType = IdentityType.APPLICATION)
> > public class Account {
>
> > �...@primarykey
> > �...@persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
> > private Key key;
>
> > �...@persistent
> > private String email;
>
> > .....
> > }
>
> > if i am now loading the object back from the store with
>
> > final SyncConfiguration syncConfig = pm.getObjectById
> > (SyncConfiguration.class, action.getSyncConfigId());
>
> > the fields account1 and account2 have the same instance.
>
> > Do i have to configure something in a different way or is it a bug?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---