Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save pauloelr/04afd0a1ca51ff03e49f to your computer and use it in GitHub Desktop.
Save pauloelr/04afd0a1ca51ff03e49f to your computer and use it in GitHub Desktop.
<?php
use Money\Money;
use Product\Model\Prices;
return [
'orm' => [
Prices::class => [
'type' => 'embeddedDocument',
'embedOne' => [
[
'fieldName' => 'price',
'targetDocument' => Money::class
],
[
'fieldName' => 'supplierPrice',
'targetDocument' => Money::class
],
[
'fieldName' => 'suggestedPrice',
'targetDocument' => Money::class
],
]
]
]
];
<?php
use Doctrine\ODM\MongoDB\Types\Type;
use Product\Model\Video;
return [
'odm' => [
Video::class => [
'type' => 'embeddedDocument',
'fields' => [
[
'type' => Type::STRING,
'fieldName' => 'url',
],
],
]
]
];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment