kla/php-activerecord — pull request #187 by pxln (2012-03-06 00:53:27+00:00)
Title: gh112 support for nested attributes

An implementation of assign_attributes from rails. Allows for nested attributes to be assigned to model relations by whitelisting them through the static $accepts_nested_attributes_for array.

Needs more testing, and preferably optimizing. I fear a sufficiently large nested data array will result in too many lookups, i tried shamelessly to minimize it though.

Anyway, it seems to work for me now, i have included a simple test of polyrelational and singlerelational data arrays. Works nicely with post values :)

It should be sufficient to close https://github.com/kla/php-activerecord/issues/112.