zf-doctrine-hydration-module icon indicating copy to clipboard operation
zf-doctrine-hydration-module copied to clipboard

Reference hydration assumes document exists

Open Bilge opened this issue 9 years ago • 2 comments
trafficstars

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.

Bilge avatar Nov 26 '15 10:11 Bilge

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.

veewee avatar Dec 01 '15 08:12 veewee

The failing tests are due to: https://github.com/phpro/zf-doctrine-hydration-module/issues/20

veewee avatar Dec 01 '15 09:12 veewee