Jira issue originally created by user else:
Dear Roman :-),
Watch testcase please to understand this issue.
Comment created by @guilhermeblanco:
In http://github.com/doctrine/doctrine2/commit/56a8f5cd5353908b815607a6e089201c95e01e6c this issue was fixed.
Thanks for the report and unit test. It saved me a LOT of time!
Issue was closed with resolution "Fixed"
Imported 1 attachments from Jira into https://gist.github.com/3081df22ce9bfd50125d