10000 Collection type and PropertyPath · Issue #4709 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

Collection type and PropertyPath #4709

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

Closed
maciej-pyszynski opened this issue Jul 2, 2012 · 2 comments
Closed

Collection type and PropertyPath #4709

maciej-pyszynski opened this issue Jul 2, 2012 · 2 comments
Labels

Comments

@maciej-pyszynski
Copy link

Current state of collections mapping is not flexible and make a lot of troubles.

In SF 2.0 if user sets by_reference property to false, setter for collection was called, e.g. setItems().
Now (SF 2.1) if object have method addItem(), this method is called.

Lets take example with ordered items, e.g. gallery images.
User changes they order in UI and script have to reorder them in DB. To do so setImages() method should be used, but class contains also addImage() method, which is used instead and breaks the logic.

There should be an option to disable individual setter usage, when by_reference is set to false.

@maciej-pyszynski
Copy link
Author

I see most of the instances of PropertyPath are created from strings and I see no entry point to pass some configuration parameter. Can you guys give me some tips of possible parameter injection?

@webmozart
Copy link
Contributor

Duplicate of #4158

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
0