mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
DDC-1647: DateTime field returns to string if used in association #2069
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 (Feb 10, 2012).
Originally assigned to: @beberlei on GitHub.
Jira issue originally created by user alexeyshockov:
I have two objects with one-to-many accociation, based on date ("date" type column in all two objects):
When I establish accociation, I get strange behaviour — without association date was DateTime, after — string.
@doctrinebot commented on GitHub (Feb 10, 2012):
Comment created by @beberlei:
Since DateTime cannot be part of a PK it cannot be part of a join column. how does the full mapping look like?
@doctrinebot commented on GitHub (Feb 13, 2012):
Comment created by megazoll:
$blank loading properly, but field "date" doesn't mapping to \DateTime
@doctrinebot commented on GitHub (Feb 20, 2012):
Comment created by @beberlei:
This kind of association is not supported, you can only map towards the Primary key of another entity. "DateTime" type cannot be part of the primary key, you have to map it as string to get it working. Sorry, these are two restrictions that greatly simplify and speed up the internals of Doctrine and that we have to keep.
@doctrinebot commented on GitHub (Feb 20, 2012):
Issue was closed with resolution "Invalid"