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

Cascade save on 1 to 1 relations #10884

Open
Miguelmatas998 opened this issue May 10, 2024 · 1 comment
Open

Cascade save on 1 to 1 relations #10884

Miguelmatas998 opened this issue May 10, 2024 · 1 comment

Comments

@Miguelmatas998
Copy link

What was unclear or otherwise insufficient?

I'm trying to implement cascading saves from a parent table to multiple child tables. The issue is that the foreign keys of the parent table are located in the child tables (as is correct in a normalized database), but TypeORM forces me to do the join from the child table, which means I can't cascade save from the parent to the children. Instead, I have to do it in the opposite direction. I'd like to know if this is a conceptual error on my part or if I'm right and TypeORM doesn't allow this type of save.

Recommended Fix

Modify the join declarations to enable cascading saves from parent to child.

Additional Context

No response

Are you willing to resolve this issue by submitting a Pull Request?

No, I don’t have the time and I’m okay to wait for the community / maintainers to resolve this issue.

@iJhefe
Copy link
Contributor

iJhefe commented May 10, 2024

give an example to reproduce this behavior

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants