Skip to content

Conversation

rdohms
Copy link
Contributor

@rdohms rdohms commented Feb 2, 2012

Added notes to inform users that in case a field is not present in the mapped class, the property_path can be set to false and thus avoiding the exceptions thrown by symfony.

This is useful for example in forms where an extra field is needed, like in registration where the "i agree to these terms" will not be persisted in the underlying user object.

This was discussed here: symfony/symfony#1960 (comment)

@vicb
Copy link
Contributor

vicb commented Feb 2, 2012

Could you also please add symfony/symfony#3182 at the same time ?

@vicb
Copy link
Contributor

vicb commented Feb 2, 2012

You should #1031 before. Sorry I have little time now.

@rdohms
Copy link
Contributor Author

rdohms commented Feb 2, 2012

Not sure what you want me to do, both of those are closed?

@vicb
Copy link
Contributor

vicb commented Feb 2, 2012

Please also doc the property_path use case of the first issue if not solved by the second.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe make it clear that this means that fields in the form but not part of the request will set the property on the object to null
(so simply not rendering the field will not ignore them as some people thought)

weaverryan added a commit that referenced this pull request Feb 8, 2012
Extra info for property_path
@weaverryan weaverryan merged commit 3029b62 into symfony:2.0 Feb 8, 2012
@weaverryan
Copy link
Member

Thanks Rafael! This is actually an excellent note - in general we will need to do a better job of explaining the purpose of forms from a data perspective.

I've made a few tweaks at sha: 706119c

To @vicb, yes, we overall need to run through a bunch of the core field types and add missing options. It's pretty high on my list.

Thanks!

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

Labels

None yet

4 participants