How Do I Delete a Business Entity Instance?
There are a number of ways to delete entities.
- Delete an instance that you have a reference to:
person.delete();
- Delete an instance where you have only its Id:
delete(personId);
- Delete the results of a query
Query query = createQuery("from Person person where exists ( " + " from PersonName as perName where person = perName.id.person and " + "perName.isPrimaryName = :systemBool and perName.entityName " + "like :name)"); query.bindLikableString("name", "ABC", 64); query.bindBoolean("systemBool", com.splwg.base.api.datatypes.Bool.TRUE); long rowsDeleted = query.delete();