I have the following unittest code. I am persisting two SecurityGroup
entities, one as a child of Tenant and one entity not having any parent.
beginTxn();
Tenant tenant = new Tenant();
SecurityGroup securityGroup = new SecurityGroup();
securityGroup.setName("PARTYMGRADMIN");
tenant.getSecGrpList().add(securityGroup);
pm.makePersistent(tenant);
commitTxn();
beginTxn();
securityGroup = new SecurityGroup();
securityGroup.setName("PARTYMGRADMIN1");
pm.makePersistent(securityGroup);
commitTxn();
beginTxn();
Query q = pm.newQuery(SecurityGroup.class);
List<SecurityGroup> results = (List<SecurityGroup>) q.execute();
assertEquals(2, results.size());
commitTxn();
I get results.size() as one. I am expecting the results.size() as two
-Aswath
--
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.