Skip to content

SELECT on parent performed when committing DELETE on child even without cascading nor mappings to update #10596

Discussion options

You must be logged in to vote

I ran the original test case at the top, the output is:

******************************** delete
******************************** commit after delete
2024-04-18 09:28:08,515 INFO sqlalchemy.engine.Engine BEGIN (implicit)
2024-04-18 09:28:08,516 INFO sqlalchemy.engine.Engine SELECT child.name AS child_name, child.parent_id AS child_parent_id 
FROM child 
WHERE child.name = ?
2024-04-18 09:28:08,517 INFO sqlalchemy.engine.Engine [generated in 0.00008s] ('some_child',)
2024-04-18 09:28:08,517 INFO sqlalchemy.engine.Engine DELETE FROM child WHERE child.name = ?
2024-04-18 09:28:08,517 INFO sqlalchemy.engine.Engine [generated in 0.00006s] ('some_child',)
2024-04-18 09:28:08,517 INFO sqlalchemy.…

Replies: 2 comments 6 replies

Comment options

You must be logged in to vote
3 replies
@zzzeek
Comment options

@zzzeek
Comment options

@lesinigo
Comment options

Comment options

You must be logged in to vote
3 replies
@zzzeek
Comment options

Answer selected by lesinigo
@lesinigo
Comment options

@lesinigo
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
orm orm - annotated declarative issues with the new annotations-based declarative ORM approach
2 participants
Converted from issue

This discussion was converted from issue #10595 on November 06, 2023 21:48.