Deletion Policy, Serialization Function, and Object-to-Storage
Explore how to manage object deletion policies and implement serialization functions for JavaScript class models. Understand how to convert complex objects to storage-ready records and maintain functional associations in front-end applications.
We'll cover the following...
Deletion policy
We have to choose and implement one of two possible deletion policies that manage the corresponding object destruction dependency in the destroy method of the property’s range class for any reference property. In our case, when deleting a publisher record, we have to choose between the following actions:
-
Delete all records of books published by the deleted publisher. This is known as existential dependency.
-
Drop the reference to the deleted publisher from all books by the deleted publisher. This is known as existential independence.
Assuming that books don’t existentially ...