zendframework/zf2 — pull request #1717 by bakura10 (2012-07-03 10:18:50+00:00)
Title: One-to-Many feature for Forms

This PR is based on the refactored form (https://github.com/zendframework/zf2/pull/1708), so please don't merge it before the previous one was merged :).

It allows to correctly populate one to many collections with objects (there is a test case at the end of FormTest). One common use case : a product with one or many categories. With the collection feature, you could create a collection of categories, and dynamically adding new ones using JavaScript and automatically validate them.

However, the Form was not able to correctly hydrate those collections into object (if one was specified). Now this is fixed, and you can fully work with entities, composed entities, relationships between entities...

I think the Form is now pretty solid and should handle most use-cases ;-). Now it's time to make some code cleaning !