Which version of the App Engine SDK?
On Fri, Mar 12, 2010 at 1:43 PM, Pavel Byles <[email protected]> wrote: > GWT: 2.0.3 > > On Fri, Mar 12, 2010 at 4:38 PM, Max Ross (Google) < > [email protected] <maxr%[email protected]>> wrote: > >> What version of the sdk are you using? >> >> On Fri, Mar 12, 2010 at 1:36 PM, Pavel Byles <[email protected]>wrote: >> >>> Anyone? >>> >>> >>> On Fri, Mar 12, 2010 at 8:41 AM, Pavel Byles <[email protected]>wrote: >>> >>>> I'm trying to delete all entities in my datastore but I receive the >>>> following error: >>>> >>>> javax.jdo.JDOUserException: One or more instances could not be deleted... >>>> NestedThrowablesStackTrace: >>>> java.lang.IllegalArgumentException: id cannot be zero... >>>> >>>> >>>> >>>> >>>> >>>> Caused by:java.lang.IllegalArgumentException: id cannot be zero.... >>>> >>>> >>>> For the following code: >>>> >>>> public void deleteAllMyType() { >>>> PersistenceManager pm = PMF.get().getPersistenceManager(); >>>> Query query = pm.newQuery(MyType.class); >>>> try { >>>> query.deletePersistentAll(); >>>> //List<MyType> clist = (List<MyType>) query.execute(); >>>> //pm.deletePersistentAll(clist); // This doesn't work either >>>> } finally { >>>> query.closeAll(); >>>> pm.close(); >>>> } >>>> } >>>> >>>> My entity class looks like this: >>>> >>>> @PersistenceCapable(identityType = IdentityType.APPLICATION)//, >>>> detachable = "false") >>>> public class MyType implements Serializable { >>>> @PrimaryKey >>>> @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) >>>> private Long id; >>>> >>>> @Persistent >>>> private String name; >>>> . >>>> . >>>> . >>>> } >>>> >>>> -- >>>> -Pav >>>> >>> >>> >>> >>> -- >>> -Pav >>> >>> -- >>> 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]<google-appengine-java%[email protected]> >>> . >>> For more options, visit this group at >>> http://groups.google.com/group/google-appengine-java?hl=en. >>> >> >> -- >> 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]<google-appengine-java%[email protected]> >> . >> For more options, visit this group at >> http://groups.google.com/group/google-appengine-java?hl=en. >> > > > > -- > -Pav > > -- > 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]<google-appengine-java%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/google-appengine-java?hl=en. > -- 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.
