[appengine-java] How to read an owned hierarchy fast?

2010-08-21 Thread Gunnar
Gunnar -- 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-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more

[appengine-java] Re: List of sub entities does not obay list order

2010-04-08 Thread Gunnar
Hi, Can anybody help solve my problem? Gunnar Here is the testcode: package appengine.test; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.PrintStream; import java.util.ArrayList; import java.util.List; import javax.jdo.JDOHelper; import javax.jdo.ObjectState

[appengine-java] Re: List of sub entities does not obay list order

2010-04-07 Thread Gunnar
Hi, Here are code for the entities MyEntity and SubEntity. Is anything wrong with the code? /Gunnar package appengine.test; import java.io.Serializable; import java.util.ArrayList; import javax.jdo.annotations.Element; import javax.jdo.annotations.Extension; import

[appengine-java] List of sub entities does not obay list order

2010-04-06 Thread Gunnar
Hi, I need to have a one to many owned relationship and be able to reorder the list. The list is stored in the data store with new elements at the end although I add the sub entity first in the ArrayList. Any suggestions? This is the result from my test servlet. deleted all objects persisted

[appengine-java] Re: Can't save 2 or more sub entities

2010-03-08 Thread Gunnar
Hi, When I removed all transactions the code works! Anyone know why it doesn't work with transactions? Gunnar On 7 mar, 18:58, Gunnar gunnar@gmail.com wrote: Hi, I've created a testservlet to illustrate my problem. I want an owned uni-directional relationship between an entity and a list

[appengine-java] Can't save 2 or more sub entities

2010-03-07 Thread Gunnar
the second entity is stored in the datastore and the first is lost. When I add the third sub-entity I get an exception. Here is the testservlet and then I'll add the result of the three cases. What can be wrong? Gunnar package com.google.appengine.demo; import java.io.ByteArrayOutputStream; import

[appengine-java] Re: lost sub entity

2010-03-03 Thread Gunnar
Hi, I finally found a solution like this: list.add(first.copy()); where copy creates a new SubEntity and copies all fields except the key to the new instance. Do you regard this as a bug? Gunnar On 2 mar, 20:28, Gunnar gunnar@gmail.com wrote: I've uploaded my app to google with the same

[appengine-java] Re: lost sub entity

2010-03-02 Thread Gunnar
I've uploaded my app to google with the same result, so it's not a problem with Eclipse or sdk version. Gunnar On 1 mar, 20:59, John Patterson jdpatter...@gmail.com wrote: http://lmgtfy.com/?q=appengine+jdo+%22default+fetch+group%22 On 2 Mar 2010, at 02:50, Gunnar wrote: I don't jnow what

[appengine-java] Re: lost sub entity

2010-03-01 Thread Gunnar
Hi, I followed Jakes advice to do e.setList(list) but no change. I've also stepped through my code, but there is no exception! Btw I use version 1.3.1 of the SDK. Gunnar On 1 mar, 15:28, John Patterson jdpatter...@gmail.com wrote: It is unusual that you see no  stack trace.  Are you sure you

[appengine-java] Re: lost sub entity

2010-03-01 Thread Gunnar
Hi, I have not defined any fetch group, should I? If so how should I do that? Gunnar On 1 mar, 15:28, John Patterson jdpatter...@gmail.com wrote: It is unusual that you see no  stack trace.  Are you sure you are not   catching it?  You could step through the code line by line to see what

[appengine-java] Re: lost sub entity

2010-03-01 Thread Gunnar
I don't jnow what you mean with look into default fetch group!. Please explain. Gunnar On 1 mar, 19:20, John Patterson jdpatter...@gmail.com wrote: Did you look into default fetch group? On 2 Mar 2010, at 01:04, Gunnar wrote: Hi, I followed Jakes advice to do e.setList(list) but no change

[appengine-java] Re: lost sub entity

2010-02-28 Thread Gunnar
with it, in any case I dont think it is what you intended... On Sat, Feb 27, 2010 at 2:52 PM, Gunnar gunnar@gmail.com wrote: Hi, I have problem with reordering a List. I created a test with an entity called MyEntity which have a ListSubEntity. First I persist one instance of MyEntity

[appengine-java] lost sub entity

2010-02-27 Thread Gunnar
Hi, I have problem with reordering a List. I created a test with an entity called MyEntity which have a ListSubEntity. First I persist one instance of MyEntity with a list containing 3 SubEntity. This works fine. Then I call a reorder servlet that moves the first SubEntity to the last position in

[appengine-java] Re: Quick question regarding List Order

2010-02-22 Thread Gunnar
I fully agree! Gunnar On 27 Jan, 19:22, datanucleus andy_jeffer...@yahoo.com wrote: AListfollows the contract of java.util.List, hence obviously ordering should be preserved. Whether it is JDO or JPA, the whole point of transparent persistence - people shouldn't need to know anything about