zoopcommerce/shard — pull request #56 by crimsonronin (2014-06-01 01:17:50+00:00)
Title: Unserialize Nested Abstract Embeds

I'm not sure why this is happening (ie. the root cause), however when I have an `EmbedMany` with a `discriminatorMap`, and those classes inherit from an abstract class which also has an `embed`, I get the following error:

```
InvalidArgumentException: Association name expected, 'price' is not an association.
```

See https://github.com/crimsonronin/shard/blob/f95b5b2a67c7e3cc74181f778c2a1dc524b64510/tests/Zoop/Shard/Test/Serializer/TestAsset/Document/Order/Order.php#L35

Adding the [following](https://github.com/crimsonronin/shard/blob/f95b5b2a67c7e3cc74181f778c2a1dc524b64510/lib/Zoop/Shard/Serializer/Unserializer.php#L234) to `Unserializer` fixes the issue:

```php
} elseif(isset($mapping['targetDocument']) && class_exists($mapping['targetDocument'])) {
$targetClass = $mapping['targetDocument'];
} else {
```

Not sure if this is just a bandaid, or the proper fix. Any suggestions @superdweebie?