Forked from fabiocarneiro/Product.Model.Prices.mapping.php
Last active
August 29, 2015 14:14
-
-
Save pauloelr/04afd0a1ca51ff03e49f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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 | |
], | |
] | |
] | |
] | |
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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