ObjectifyBookShelfDAO transactionalDao = new ObjectifyBookShelfDAO(true);
transactionDao.removeThis(item);
// Its get removed开发者_JAVA百科 only after i commit
// Perform some operations
transactionDao.ofy().getTxn().commit();
There is a scenario where in i want this object to be removed on instant... How do i do this ..
it looks like you're using objectify-appengine. as the objectify transaction docs describe, if you make your call to removeThis()
outside of a transaction, it will happen immediately.
as an alternative, objectify lets you mix in calls to the built in low level java datastore API. you could use that and call DatastoreService.delete()
without passing a transaction.
精彩评论