Hi Eric. Your entities should not be returning after they have been deleted.
Are you running this in the local development environment or in production?
And are you certain that you weren't inadvertently mixing up your
application IDs, e.g. deleting data from one app and checking another the
following day?

- Jason

On Sat, Oct 24, 2009 at 5:46 AM, Eric <eric.s.lan...@gmail.com> wrote:

>
> Hi,
>
> I'm trying to delete some unwanted data from my datastore and found
> some code using the DatastoreService that I modified to delete as many
> entries as possible in 10 seconds:
>
> DatastoreService datastore =
> DatastoreServiceFactory.getDatastoreService();
> Query query = new Query("PostalCodes");
> long starttime = (new Date()).getTime();
> for (Entity entity : datastore.prepare(query).asIterable()) {
>        datastore.delete(entity.getKey());
>        if ((new Date().getTime()) > (starttime + 10000))
>                break;
> }
>
> It seems to work when I run this. I check the console's data viewer
> and the Kind I'm trying to delete ("PostalCodes") is gone, but the day
> after I do this, the whole thing has been restored. Am I missing a
> call to flush or commit or something?!?
>
> Is there a better way to do this?
>
> Thanks in advance,
> Eric
> =)
> >
>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to