I am using the Eclipse Plugin to develope for the GAE. I would like to
persist an object, using following source code:

@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class Test {

        @Persistent(primaryKey = "true", valueStrategy =
IdGeneratorStrategy.IDENTITY)
        private Long id;

        @Persistent
        private TestObject obj;

        public Test() {
                this.obj = new TestObject();
        }
}

@PersistenceCapable(embeddedOnly = "true")
public class TestObject {

        @Persistent
        private String test;

        public TestObject() {
                this.test = "test";
        }
}

I am using the persistence manager with following code:

Test t = new Test();
PersistenceManager pm = JDOPersistenceManagerFactory.get
().getPersistenceManager();
try {
        pm.makePersistent(t);
} finally { pm.close(); }

However the source code which can be seen above does not persist
anything but the id.  My final goal is to have the TestObject as a
primary key, with either the id as a field of the object or even
better no specific id in the TestObject, but simply use the existing
fields of the object as unique idetification. Is that possible at all?

For debugging purposes it would be great to know where the persistent
data is stored in case the app is run as a local web application. So
far I could not find anything that looked like a lokal datastore.

Any help is greatly appreciated!
Hacci

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" 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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to