Skip to content
This repository has been archived by the owner on May 29, 2024. It is now read-only.

Reference hydration assumes document exists #21

Open
Bilge opened this issue Nov 26, 2015 · 2 comments
Open

Reference hydration assumes document exists #21

Bilge opened this issue Nov 26, 2015 · 2 comments

Comments

@Bilge
Copy link
Contributor

Bilge commented Nov 26, 2015

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.

@veewee
Copy link
Contributor

veewee commented Dec 1, 2015

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
Copy link
Contributor

veewee commented Dec 1, 2015

The failing tests are due to:
#20

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants