doctrine / doctrine/common

DCOM-308: Create a Mapping Component

Open
#622 1 comment 0 reactions 1 assignee Claimed by @guilhermeblanco View on GitHub
New Feature
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.