2010/11/4 Jordi Boggiano <[email protected]>: > And what about using a new stdClass object, putting all the data on it, > and validating that? How would the validator distinguish it from an > Entity object? If all the properties are public I assume it doesn't try > and use getters/setters?
Sounds like a hack to me. Apart from that, the validator can't know about the constraints in this case, because constraints are defined on your class (not stdClass). Even if you propose to pass the desired constraints manually, this does not work for cascaded constraints (Author->Emails etc.), because the validator discovers the constraints of these cascaded objects automatically by introspecting the class name. Bernhard -- Software Architect & Engineer Blog: http://webmozarts.com Twitter: http://twitter.com/webmozart -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/symfony-devs?hl=en
