Hello Friends,
We've seen a problem with Elixir and deleting objects. We have a
typical type relationship with a FK and cascading deletes, using
Postgres.
Upon deletion of a parent record in a FK relationship, rather than
deleting the child record, elixir appears to be simply nulling the
parent_id in the child record. Our model is something like:
class Parent(Entity):
has_many('children',of_kind='Child',inverse="parent")
class Child(Entity):
belongs_to('parent',of_kind='Parent',inverse='children',ondelete="CASCADE",required=True)
Using sqlalchemy directly, the delete process appears to occur as
expected, with the parent and corresponding child record(s) deleted.
Using elixir the following error results:
'UPDATE child SET parent_id=%(parent_id)s WHERE child.id = %
(child_id)s' {'child_id': 24, 'parent_id': None}
Any ideas here? I can't see in the code why this is happening.
Thanks,
Matt
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"SQLElixir" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/sqlelixir?hl=en
-~----------~----~----~----~------~----~------~--~---