Skip to content
This repository has been archived by the owner on Dec 7, 2023. It is now read-only.

Registered model redefinition #14

Open
dgasull opened this issue Nov 27, 2019 · 2 comments
Open

Registered model redefinition #14

dgasull opened this issue Nov 27, 2019 · 2 comments
Assignees
Labels
Milestone

Comments

@dgasull
Copy link
Contributor

dgasull commented Nov 27, 2019

Design and implement a way to "redefine" or "replace" an already registered class. This will replace the current classes deployed in execution environments and objects belonging to the class will be lost/removed to avoid serialization issues. The call should warn the user about it. A name for the API call can be overwriteModel or replaceModel ...

@dgasull
Copy link
Contributor Author

dgasull commented Nov 27, 2019

This also refers to bsc-dom/javaclay#9

@alexbarcelo
Copy link
Member

Maybe it would make more sense (for the user) to have an explicit deleteModel and not an overwrite/replace.

A deleteModel should (seems obvious!) remote all the objects belonging to the class. And once the model has been deleted, the new one can be registered again.

Disclaimer: This may be finnicky in scenarios in which a registered class has attributes with the type of the class being deleted, e.g. class A contains an attribute of B and class B is being deleted. Though this consideration should also be extrapolated to objects referencing objects.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants