Open Bilge opened 8 years ago
This can be fixed by adding a custom strategy. Personally I have never encountered a situation where I wanted to create a referenced resource at the same time as attaching it to another entity. If this is something that is required frequently, it can be added as a default strategy to this repository.
The failing tests are due to: https://github.com/phpro/zf-doctrine-hydration-module/issues/20
When hydrating referenced documents the current logic assumes that an identifier will be passed and that a document with that identifier already exists. This may not be the case, however, and in the event that no identifier is passed it should be possible to instantiate a new document in lieu of an existing one.