mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
DDC-3299: Possibility to define Entities in separate Bounded Context #4077
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @doctrinebot on GitHub (Sep 9, 2014).
Originally assigned to: @Ocramius on GitHub.
Jira issue originally created by user piteer1:
It would be great to have a possibility to define two entities in different Bounded Context. For now it's possible without a problem to use such an Entities but it's impossible to use schema tools, when two separate Entities map to the same table.
@doctrinebot commented on GitHub (Sep 10, 2014):
Comment created by @ocramius:
This feature would break a very important invariant existing in the ORM: only one entity for a particular identifier existing in memory at any time.
This cannot be implemented, and actually goes against the rules imposed by the ORM.
The only solution to this problem would be to have a writable view, and mapping an entity to it, and an entity to the actual table: that's still making some of the transactions in your application very risky.
@doctrinebot commented on GitHub (Sep 10, 2014):
Issue was closed with resolution "Invalid"
@doctrinebot commented on GitHub (Sep 12, 2014):
Comment created by piteer1:
But wouldn't it be possible to implement it really similar to single table inheritance but without a DiscriminatorColumn? Which instance would be returned would depend on the repository used.
@doctrinebot commented on GitHub (Sep 13, 2014):
Comment created by @ocramius:
[~piteer1] that wouldn't prevent having two instances of the same entity in memory, which is a problem.