[DDC-2034] getPartialReference returns partial entities for non existent entities Created: 17/Sep/12 Updated: 05/Oct/12 Resolved: 05/Oct/12
|Project:||Doctrine 2 - ORM|
|Reporter:||Oleg Namaka||Assignee:||Benjamin Eberlei|
prints -1. Is it an expected behavior or a bug? Shouldn't a check be made to prevent creating new instances for ids that do not exist?
|Comment by Christophe Coevoet [ 17/Sep/12 ]|
Well, the purpose of getPartialReference is to return a reference without querying the database. So it cannot know if the id exists.
|Comment by Oleg Namaka [ 19/Sep/12 ]|
Ok, in that case a user is responsible for providing a valid id. But what is a use case for such an entity? Can someone give me a real example?
|Comment by Benjamin Eberlei [ 05/Oct/12 ]|
the use case was partially removed by proxy objects now being capable of returning the id without querying.