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