[appengine-java] Re: Retrieving child records using entity group parent's primary key.

2009-08-26 Thread rohit jain
Hello This is my test case : Long catId = Long.parseLong("23"); ICategory catObj = catDao.get(catId); ICompany comp = new Company("Test compamy", catObj); comp = compDao.save(comp); This is interface for category type : public interface ICategory { public Ke

[appengine-java] Re: Retrieving child records using entity group parent's primary key.

2009-08-26 Thread Jason (Google)
Try adding the catId field to the default fetch group: ... @Persistent(defaultFetchGroup = "true") private Category catId; Then, when you fetch a Company object, you should be able to call company.getCatId() or whatever method you've set up to get a reference to the corresponding Category object.

[appengine-java] Re: Retrieving child records using entity group parent's primary key.

2009-08-25 Thread java
Hello we have similar type of problem and code is there is company class model. public class Company implements ICompany { private static final long serialVersionUID = 1L; @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Key id;