Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork5.3k
Refactored docs to use adders/removers#2434
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
wouterj commentedMar 31, 2013
The code is tested on 2.1 and it works. I have one question though. There is a note that says:
I tested it with Doctrine 2.3.1 and I got no error. |
stof commentedApr 6, 2013
@wouterj Are you adding new elements in the collection or only editing exsting ones ? |
stof commentedApr 6, 2013
And are you cascading the persist on the relation ? If yes, it is indeed useless to persist explicitly each tag |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
You need to define bothaddTag andremoveTag. If one of them is missing, the setter for the collection will be used when usingby_reference => false, not the adder and remover for each element
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
fixed
weaverryan commentedApr 26, 2013
Ping@wouterj! I'm waiting for answers on Stof's questions before moving on :) |
wouterj commentedApr 27, 2013
Sorry for my delay on this. I need to finish some PRs now! :) @stof was correct, the entity I used was cascading the persist action. (I just used your entity, so I wasn't aware of that) |
wouterj commentedApr 27, 2013
@weaverryan I've updated the article, I think it's ready now |
Refactored docs to use adders/removers
This is the first draw to fix this document for 2.1. I have not tested the code yet, that's why I called it a WIP.