DCOM-308: Create a Mapping Component
- Dominant language
- PHP
- Stars
- 5.8k
- Forks
- 284
- PR merge metrics
- No merged PRs in 30d
Description
Jira issue originally created by user @ocramius:
All of the ORM/ODM projects currently rely on bi-directional mapping of:
- one column (persistence layer) <-> one object property
- one column (persistence layer) <-> one embeddable property
- multiple columns (persistence layer) <-> one embeddable property
- multiple columns (persistence layer) <-> one object property
- one column (persistence layer) <-> multiple property
- one column (persistence layer) <-> multiple embeddable properties
- one column (persistence layer) <-> an association
- multiple columns (persistence layer) <-> an association
... and more
Hibernate ORM seems to abstract this logic with a `Property` and a `Column` abstractions, each being a visitable DSL ( `accept($value, $orm)` , or similar).
This sort of DSL would be:
- a good replacement for DBAL types
- a good embeddable hacks
- a good replacement for association hydration logic
- a good replacement for identifier mapping
We could need a mapping component that allows mapping any map-alike data-structure to any php object graph.
Contributor guide
Assessment
This issue has not been assessed yet.