cayenneContext.deleteObjects(ObjectSelect.query(MyTable.class).select(cayenneContext));
is not very efficient for many objects.
Is there anything elegant like ObjectDelete.delete(MyTable.class)
that I failed to discover?
SQLExec.query("delete from MY_TABLE").execute(cayenneContext);
is fine, if no better way to do it. But I'd need to know the table name for this (I have another question for that).