DDC-2768: Doctrine could not work with date as primary key #3514

Closed
doctrinebot opened this Issue Oct 30, 2013 · 3 comments

2 participants

@doctrinebot

Jira issue originally created by user hell0w0rd:

Part of my mapping:

id:
    statDate:
        type: date
    phrase:
        type: string
    bannerId:
        type: integer

So I've got an exception:
{quote}
Object of class DateTime could not be converted to string in /Users/hell0w0rd/dev/rsol/direct/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php line 13

45
{quote}

@doctrinebot

Comment created by @ocramius:

DateTime instances must implement **toString in order to be used as identifiers. That is a known limitation.

See http://stackoverflow.com/questions/15080573/doctrine-2-orm-datetime-field-in-identifier/15085566#comment21225419_15085566

@doctrinebot

Issue was closed with resolution "Invalid"

@Ocramius Ocramius was assigned by doctrinebot Dec 6, 2015
@doctrinebot doctrinebot closed this Dec 6, 2015
@doctrinebot doctrinebot added the Bug label Dec 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment