You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If child object has an id column which named different with parent's id,
an invalid DELETE query created and failed to execute the test JdbcRepositoryWithCollectionsChainHsqlIntegrationTests#deleteByName.
(in 3.5.x, 4.0.0-M versions)
I reproduced in commit chanhyeong@7cca9ee, and it creates an error message below.
org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [DELETE FROM "GRAND_CHILD_ELEMENT" WHERE "GRAND_CHILD_ELEMENT"."CHILD_ELEMENT" IN (SELECT "CHILD_ELEMENT"."ID" FROM "CHILD_ELEMENT" WHERE "CHILD_ELEMENT"."DUMMY_ENTITY" IN (SELECT "DUMMY_ENTITY"."ID" FROM "DUMMY_ENTITY" WHERE "DUMMY_ENTITY"."NAME" = ?))]
Activity
Huiyeongkim commentedon Aug 26, 2025
Hi @chanhyeong, I’m interested in contributing to this issue!
schauder commentedon Aug 26, 2025
You are welcome to. Let me know if you need help.
chanhyeong commentedon Aug 27, 2025
@Huiyeongkim
I've been waiting a comment from maintainers, but it's okay if you want to do it!
Fix DELETE query in derived delete operations
Fix DELETE query in derived delete operations
Huiyeongkim commentedon Aug 29, 2025
@chanhyeong
Thank you for giving me the opportunity! I really appreciate it.
Mirror aggregate deletes in derived deletes
sharanggupta commentedon Oct 22, 2026
@schauder, I have a branch covering this together with #2417, offered on #2418; happy to split the id-column part out into its own PR if you prefer.