Closed Ivorius closed 4 years ago
It can not be used relationship in embeddables because throw exception Nextras\Orm\NullValueException
Property ...\Order::$country is not nullable
/** * @property-read string|NULL $street * @property-read string|NULL $city * @property-read string|NULL $postCode * @property Country $country {default CZ} {m:1 Country, oneSided=true} */ class Address extends \Nextras\Orm\Entity\Embeddable\Embeddable { public function __construct(string $street, string $city, string $postCode, Country $country) { parent::__construct([ 'street' => $street, 'city' => $city, 'postCode' => $postCode, 'country' => $country, ]); } }
Mapping
$conventions->setMapping('address->street', 'street'); $conventions->setMapping('address->city', 'town'); $conventions->setMapping('address->postCode', 'postcode'); $conventions->setMapping('address->country', 'country_code');
Versions::
In the end, this is not really not supported. Please see for future enhancements and implementation: https://github.com/nextras/orm/issues/430
It can not be used relationship in embeddables because throw exception Nextras\Orm\NullValueException
Property ...\Order::$country is not nullable
Mapping
Versions::