UnionOfRAD/lithium — pull request #471 by nealerickson (2012-05-20 00:24:12+00:00)
Title: Updated test case for bug in casting subobject arrays

Added a new test case and modified the $_schema so that I could test type casting arrays of subobjects. The documents are being saved, however the values being saved to the db are not cast properly.

Ideally the following schema would allow me to properly cast an array of subobjects at the accounts path.
```php
protected $_schema = array(
'_id' => array('type' => 'id'),
'accounts' => array('type' => 'object', 'array' => true),
'accounts._id' => array('type' => 'id'),
'accounts.name' => array('type' => 'string'),
'accounts.created' => array('type' => 'date'),
);
```

However, when saving the following data the values in account arrays are not being properly cast. The _id fields remain strings while the created fields are numeric timestamps and not instances of MongoDate.
```php
$data = array(
'_id' => '4c8f86167675abfabd970300',
'accounts' => array(array(
'_id' => "4fb6e2dd3e91581fe6e75736",
'name' => 'Foo',
'created' => time()
),array(
'_id' => "4fb6e2df3e91581fe6e75737",
'name' => 'Bar',
'created' => time()
)
)
);
```
Ran the changes through li3_qa and everything passed. Looks like my editor was breaking out my tabs into spaces on my last commit.