Hi, My declarations are a bit different but I have seen this happening ....
GAE not loading the subitems by default in some cases, then if you close the PersistenceManager, subitems List is null. I have solved it by looping all items and subitems before closing the PersistenceManager.... On Jun 9, 4:05 am, cghersi <cristiano.ghe...@gmail.com> wrote: > Hi all, > > I've got an issue with a property with type ArrayList<String>. > > Let's suppose I've got a class like this: > > @PersistenceCapable(identityType = IdentityType.APPLICATION, > detachable = "true") > @Inheritance(strategy=InheritanceStrategy.SUBCLASS_TABLE) > public class CommContact implements Serializable { > @PrimaryKey > @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) > protected Long idCont; > > @Persistent(defaultFetchGroup="true") > protected ArrayList<String> tags; > > // other properties.... > > } > > And another class DBContact that extends CommContact, like this: > @PersistenceCapable(identityType = IdentityType.APPLICATION, > detachable = "true") > public class DBContact extends CommContact { > // some other properties... > > } > > Now, let's suppose that I do a query on datastore and I retrieve a > DBContact object. Sometimes (I cannot understand which is the pattern > for this issue...) the property "tags" is not correctly valued, > resulting in an empty array (but if I go to the DataViewer, I can > actually see that on the datastore some tags exist for this DBContact > object...). > > What am I missing? > > I really cannot understand why sometimes it works and sometimes not... > > Thank you very much! > > Bye > cghersi -- 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 google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.