-
Notifications
You must be signed in to change notification settings - Fork 36
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
Utilise $owns for recursive duplication #28
Comments
I have supplied an example of how we've handled this on Elemental here: #25 (comment) |
@sminnee, @chillu, @tractorcow have also made similar comments here: |
At the moment we have the following method signature for duplicate:
What we could do is change it to
So that it allows you to duplicate owned objects, rather than trying to infer it from the relationship type. Note that many_many currently only duplicates the mapping table. We could use the following behaviour:
@pitchandtone would love to hear your feelings. :) |
@tractorcow wouldn't matching the publish api signature be better? duplicateRecursive and duplicateSingle? and then deprecating duplicate for v5, but calling Recursive if $withOwned = true |
+1 for API consistency. |
The ticket title reads "Utilise $owns for recursive duplication and deletion", but the comments only discuss duplication. On #23 the consensus seems to be that we can't infer delete/unpublish from ownership. Should we limit this ticket to duplication? |
Renamed. |
This is fine, since duplicate() is dataobject, but duplicateRecursive() / duplicateSingle() can be versioned specific. This will make it opt-in though. |
My view is:
"Owns" kind of means "cascade_creates" Make sense? |
Yes I think so. You agree that with owned many_many, we should only need to duplicate the mapping though, correct? |
Moving this to |
WIP branches:
I'm going to have a |
API has been merged, recursive duplication is now available |
Since $owns handles versioning cascade, and should handle unpublish, we should also be able to imply duplication (similar to publish). The logic should be similar to the recursive publish method.
Acceptance Criterea:
PRs
The text was updated successfully, but these errors were encountered: