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

Multiple cascades should be combined #472

Closed
horato opened this issue Oct 8, 2020 · 0 comments
Closed

Multiple cascades should be combined #472

horato opened this issue Oct 8, 2020 · 0 comments
Labels
Milestone

Comments

@horato
Copy link

horato commented Oct 8, 2020

Hello,

HasMany (OneToManyPart) allows you to specify multiple cascades by doing .Cascade.SaveUpdate().Cascade.Delete()

collectionAttributes.Set("Cascade", Layer.UserSupplied, current == null ? value : string.Format("{0},{1}", current, value));

HasOne (OneToOnePart) only takes the last cascade option specified.

cascade = new CascadeExpression<OneToOnePart<TOther>>(this, value => attributes.Set("Cascade", Layer.UserSupplied, value));

Is this by design or a bug?

@hazzik hazzik added the bug label Oct 9, 2020
@hazzik hazzik added this to the v3.0.1 milestone Oct 9, 2020
@hazzik hazzik changed the title Inconsistent cascading between HasOne and HasMany Multiple cascades should be combined Oct 9, 2020
@hazzik hazzik closed this as completed in e4c6e16 Oct 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants