Persistent object VS persistent entity

0
Hello. After using some modules i've downloaded from the app store, i've noticed that a few of them create persistent objects. Searching for information on the subject, all i could find is information on persistent entities, where objects of persistent entities are created in memory, and not created in the database. Assuming that creating a persistent object on a regular entity is pretty much the same thing, i question the need of needing to delete said objects from the entities after being created (for example, on the advanced email module, if the settings are configured not to store sent emails, the microflow deletes the created object). It would then seem that assuming that creating a persistent object on a regular entity and creating an object on a persistent entity are equal things is wrong. What is then the difference between the two?
asked
1 answers
3

If an entity is persistable it means that they are capable of being saved to the database. I'm not sure if I understand your question completely but the difference between non-persistable and persistable entities is only that you can save objects of persistable entities to the database (meaning they become persistent) and can't save objects of non-persistable entities to the database.

You don't really HAVE to delete objects of non-persistable entities, though as long as they are referred to by something they will live in the memory of your application so it might still be a good idea.

There isn't much difference between the 2 entity types for objects that haven't been stored in the database yet, the non-persistable modifier is just convenient so you know it's a temporary object.

Before version 4, all object instances were immediately inserted in the database on creation. If you are still using old (version 3 and before) create actions and new buttons in converted projects, this is still the case (for backward compatibility reasons)

It's quite likely that most of the modules that are currently in the appstore still use the old create actions and new buttons.

answered