0

I need to remove records from a store of ActivePivot 5.0.

How can I achieve this when I do not know the full keys of these records?

Jack
  • 145
  • 1
  • 1
  • 11

1 Answers1

2

this should work fine:

    try {
        datastore.getTransactionManager().startTransaction();
        datastore.getTransactionManager().removeWhere("storeName", BaseConditions.Equal("attribute", value));
        datastore.getTransactionManager().commitTransaction();
    } catch (DatastoreTransactionException e) {
        try {
            datastore.getTransactionManager().rollbackTransaction();
        } catch (DatastoreTransactionException re) {
            throw new QuartetRuntimeException("The transaction rollback has failed.", re);
        }
        throw new QuartetRuntimeException("The transaction commit has failed.", e);
    }
tuxmobil
  • 238
  • 3
  • 10