-
Notifications
You must be signed in to change notification settings - Fork 232
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
create_or_update does not call post_save #647
Comments
I ran the following code in 4.0.8. class RelA(StructuredRel):
def pre_save(self):
print("relation pre_save")
def post_save(self):
print("relation post_save")
class NodeA(StructuredNode):
b = RelationshipTo("NodeB", "SOME_REL", model=RelA)
def pre_save(self):
print("node pre_save")
def post_save(self):
print("node post_save")
def pre_delete(self):
print("node pre_delete")
def post_delete(self):
print("node post_delete")
def post_create(self):
print("node post_create")
class NodeB(StructuredNode):
pass
a = NodeA().save()
a.b.connect(NodeB().save())
a.delete() Output:
All hooks works well.
|
Changed the title to your actual problem. Wouldn't know if this is by design, or something to add. Do you have an idea @a-takahashi223 ? |
I ran the test because the original title "Some hooks are only available using django_neomodel (pre_save, post_save, pre_delete, post_delete)" is concerned. I don't know about django_neomodel or create_or_update. Sorry. |
Hi! In neomodel==4.0.8,
create_or_update
does not call thepost_save
hook. Is this by design intended? Thanks!The text was updated successfully, but these errors were encountered: