Use delete() instead of truncate() to avoid errors.

Truncating a table with foreign keys throws a QueryException. Using the delete method empties the table just as well yet doesn't throw an exception.