Forked from pauloelr/Product.Model.Prices.mapping.php
Last active
August 29, 2015 14:14
-
-
Save fabiocarneiro/04675526a1c53862ebf6 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 [ | |
Prices::class => [ | |
'type' => 'embeddedDocument', | |
'orm' => [ | |
'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 [ | |
Video::class => [ | |
'type' => 'embeddedDocument', | |
'odm' => [ | |
'fields' => [ | |
[ | |
'type' => Type::STRING, | |
'fieldName' => 'url', | |
], | |
], | |
] | |
] | |
]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment