Allow serialized objects?
- Dominant language
- PHP
- Stars
- 181
- Forks
- 102
- PR merge metrics
- No merged PRs in 30d
Description
Currently if you want to store an object as a property of a document, you need to map it as a child document
Doctrine ORM has the option to store ojects as serialized PHP, this is can be more desireable than mapping a child document for performance reasons.
So I would propose something like:
``` php
/**
* @PHPCRODM\Field(type="php_object")
*/
```
(FTR Doctrine ORM uses `object`, not sure if that would be better here).
Alternatively we could make it possible for users to implement custom types (I don't think this is already possible?).
Contributor guide
Research direction
Start by reviewing the existing field type and mapping behavior in PHPCR-ODM, then investigate whether custom types are currently supported. Define the intended behavior for storing serialized PHP objects and compare it with the alternative of exposing user-defined types; done means one documented, supported approach with appropriate coverage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100