|
@@ 709-714 (lines=6) @@
|
| 706 |
|
$reference = ['id' => $class->getDatabaseIdentifierValue($id)]; |
| 707 |
|
break; |
| 708 |
|
|
| 709 |
|
case ClassMetadataInfo::REFERENCE_STORE_AS_DB_REF: |
| 710 |
|
$reference = [ |
| 711 |
|
'$ref' => $class->getCollection(), |
| 712 |
|
'$id' => $class->getDatabaseIdentifierValue($id), |
| 713 |
|
]; |
| 714 |
|
break; |
| 715 |
|
|
| 716 |
|
case ClassMetadataInfo::REFERENCE_STORE_AS_DB_REF_WITH_DB: |
| 717 |
|
$reference = [ |
|
@@ 716-722 (lines=7) @@
|
| 713 |
|
]; |
| 714 |
|
break; |
| 715 |
|
|
| 716 |
|
case ClassMetadataInfo::REFERENCE_STORE_AS_DB_REF_WITH_DB: |
| 717 |
|
$reference = [ |
| 718 |
|
'$ref' => $class->getCollection(), |
| 719 |
|
'$id' => $class->getDatabaseIdentifierValue($id), |
| 720 |
|
'$db' => $this->getDocumentDatabase($class->name)->getName(), |
| 721 |
|
]; |
| 722 |
|
break; |
| 723 |
|
|
| 724 |
|
default: |
| 725 |
|
throw new \InvalidArgumentException("Reference type {$storeAs} is invalid."); |