DDC-2034: getPartialReference returns partial entities for non existent entities #2567

Open
opened 2026-01-22 13:57:08 +01:00 by admin · 0 comments
Owner

Originally created by @doctrinebot on GitHub (Sep 17, 2012).

Originally assigned to: @beberlei on GitHub.

Jira issue originally created by user deatheriam:

$variant = $em->getPartialReference('Entity\Variant', -1);
echo $variant->getVariantId();

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?

Originally created by @doctrinebot on GitHub (Sep 17, 2012). Originally assigned to: @beberlei on GitHub. Jira issue originally created by user deatheriam: ``` $variant = $em->getPartialReference('Entity\Variant', -1); echo $variant->getVariantId(); ``` 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?
admin added the Bug label 2026-01-22 13:57:08 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#2567