Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return existing generated classes #63

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

CasperWA
Copy link
Collaborator

Closes #27

If an entity instance class has already been created/generated, it will be reused instead of being recreated.

To do:

  • Test the implementation.

This is from `create_entity()`.

If an existing class already exists in the `generated_classes` module,
it is investigated whether the `entity` attribute matches the current
entity, if yes, the class is returned, if no to any of those conditions
a ValueError is raised.

In the future, one could either extend the naming conventions of these
classes to include more and more "parts" of the identity in order to get
uniqueness, supporting having entity instance classes for the same
entity with different versions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Return already created classes from factory
1 participant