The defined entity has already been created and saved. But what if we need to remove it? That's easy too:

$article Content_Article::load$some_id );

This is the same principle as for storage. So even deleting takes care of the subentities of the main entity, or the subentities of the subentity.

It is possible to delete only subentity alone (e.g. a certain language version of an article, etc.).

Again, it's good to keep in mind events - for example, after deletion, you may need to remove (or move) files that had context with the entity, etc. Again, the encapsulation principle should be followed, and the delete() method should take care of everything needed.

Like saving, the delete process is an SQL transaction (if backend can do it), which includes deleting any subnets. The transaction is started automatically, terminated automatically, and a rollback on failure also occurs.

A delete failure throws an exception.

Previous chapter
Next chapter
Creation of queries