j***@ofertix.com
2016-04-07 08:48:13 UTC
When I do a doctrine:migrations:diff on Symfony 2.8 Doctrine throws this
Mapping Exception:
[Doctrine\Common\Persistence\Mapping\MappingException] No mapping file
found named 'NameVO.orm.xml' for class
'Component\Customer\Domain\Model\NameVO'.
I can't figure out what's wrong with my mapping.
Here it is my mapping file for the Entity containing the embeddable:
<?xml version="1.0" encoding="utf-8"?>
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd">
<entity name="Component\Customer\Domain\Model\Customer" table="customer"
repository-class="GAT\CustomerBundle\Infrastructure\DoctrineCustomerRepository">
<id name="id" type="string" column="id" length="36">
<generator strategy="UUID"/>
</id>
<field name="email" type="string" column="email" length="255" nullable="false"/>
<field name="store" type="smallint" column="store" length="1" nullable="false"/>
<field name="type" type="smallint" column="type" length="1" nullable="false"/>
<field name="password" type="string" column="password" length="60" nullable="true"/>
<field name="status" type="smallint" column="status" length="1" nullable="false"/>
<field name="legalId" type="string" column="legal_id" length="24" nullable="true"/>
<field name="gender" type="string" column="gender" length="1" nullable="true"/>
<field name="birthdate" type="date" column="birthdate" nullable="true"/>
<field name="telephone" type="string" column="telephone" length="24" nullable="true"/>
<field name="zipcode" type="string" column="zipcode" length="5" nullable="true"/>
<field name="creationChannel" type="string" column="creation_channel" length="2" nullable="false"/>
<field name="marketingLead" type="string" column="marketing_lead" length="255" nullable="true"/>
<embedded name="name" class="Component\Customer\Domain\Model\NameVO" use-column-prefix="false"/>
</entity>
<embeddable name="Component\Customer\Domain\Model\NameVO">
<field name="firstName" type="string" column="first_name" nullable="true"/>
<field name="lastName" type="string" column="last_name" nullable="true"/>
</embeddable>
</doctrine-mapping>
Thanks for any help you can provide.
Mapping Exception:
[Doctrine\Common\Persistence\Mapping\MappingException] No mapping file
found named 'NameVO.orm.xml' for class
'Component\Customer\Domain\Model\NameVO'.
I can't figure out what's wrong with my mapping.
Here it is my mapping file for the Entity containing the embeddable:
<?xml version="1.0" encoding="utf-8"?>
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd">
<entity name="Component\Customer\Domain\Model\Customer" table="customer"
repository-class="GAT\CustomerBundle\Infrastructure\DoctrineCustomerRepository">
<id name="id" type="string" column="id" length="36">
<generator strategy="UUID"/>
</id>
<field name="email" type="string" column="email" length="255" nullable="false"/>
<field name="store" type="smallint" column="store" length="1" nullable="false"/>
<field name="type" type="smallint" column="type" length="1" nullable="false"/>
<field name="password" type="string" column="password" length="60" nullable="true"/>
<field name="status" type="smallint" column="status" length="1" nullable="false"/>
<field name="legalId" type="string" column="legal_id" length="24" nullable="true"/>
<field name="gender" type="string" column="gender" length="1" nullable="true"/>
<field name="birthdate" type="date" column="birthdate" nullable="true"/>
<field name="telephone" type="string" column="telephone" length="24" nullable="true"/>
<field name="zipcode" type="string" column="zipcode" length="5" nullable="true"/>
<field name="creationChannel" type="string" column="creation_channel" length="2" nullable="false"/>
<field name="marketingLead" type="string" column="marketing_lead" length="255" nullable="true"/>
<embedded name="name" class="Component\Customer\Domain\Model\NameVO" use-column-prefix="false"/>
</entity>
<embeddable name="Component\Customer\Domain\Model\NameVO">
<field name="firstName" type="string" column="first_name" nullable="true"/>
<field name="lastName" type="string" column="last_name" nullable="true"/>
</embeddable>
</doctrine-mapping>
Thanks for any help you can provide.
--
You received this message because you are subscribed to the Google Groups "doctrine-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to doctrine-user+***@googlegroups.com.
To post to this group, send email to doctrine-***@googlegroups.com.
Visit this group at https://groups.google.com/group/doctrine-user.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "doctrine-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to doctrine-user+***@googlegroups.com.
To post to this group, send email to doctrine-***@googlegroups.com.
Visit this group at https://groups.google.com/group/doctrine-user.
For more options, visit https://groups.google.com/d/optout.