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

Support changed markers #10

Closed
Tracked by #21
ddanier opened this issue Jul 17, 2023 · 2 comments
Closed
Tracked by #21

Support changed markers #10

ddanier opened this issue Jul 17, 2023 · 2 comments
Assignees

Comments

@ddanier
Copy link
Member

ddanier commented Jul 17, 2023

Sometimes it might be necessary to mark your object to be changed for certain things - while this information is not available through the fields itself.

Usage could be:

obj = Something()

assert not something.model_has_changed  # False

obj.model_mark_changed("some_key_you_like")

assert something.model_has_changed  # True
obj.model_changed_markers  # {"some_key_you_like"}

obj.model_unmark_changed("some_key_you_like")

assert not something.model_has_changed  # False

Example usage could be if you are using relational databases and want to mark the change of child DB structures in your parent.

@ddanier
Copy link
Member Author

ddanier commented Nov 10, 2023

@simone-ebeling Could you please review the changes in #20

@ddanier ddanier self-assigned this Nov 10, 2023
@ddanier ddanier mentioned this issue Nov 10, 2023
3 tasks
ddanier added a commit that referenced this issue Jan 4, 2024
@ddanier
Copy link
Member Author

ddanier commented Jan 4, 2024

Released with 0.6.0

@ddanier ddanier closed this as completed Jan 4, 2024
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

No branches or pull requests

1 participant