Hello.
My EntityObject (Contract) has a List of ValueObjects (Contact) in Contact are other ValueObjects (Address and CommunicationData) and i want to map this.
If've tried that:
Code:
<bag name="ContactPersons" cascade="all">
<key column="ContractGuid" />
<composite-element class="ContactPersons">
<property name="CompanyName" column="ContactPersonCompanyName" type="String" length="50" not-null="false" />
<property name="Firstname" column="ContactPersonFirstname" type="String" length="50" not-null="false" />
<property name="Surname" column="ContactPersonSurname" type="String" length="50" not-null="false" />
<property name="Salutation" column="ContactPersonSalutation" type="String" length="50" not-null="false" />
<property name="Role" column="ContactPersonRole" type="String" length="50" not-null="false" />
<property name="DateOfBirth" column="ContactPersonDateOfBirth" type="String" length="10" not-null="false" />
<property name="TaxOffice" column="ContactPersonTaxOffice" type="String" length="50" not-null="false" />
<property name="TaxId" column="ContactPersonTaxId" type="String" length="50" not-null="false" />
<property name="SalesTaxId" column="ContactPersonSalesTaxId" type="String" length="50" not-null="false" />
<property name="TradeRegister" column="ContactPersonTradeRegister" type="String" length="50" not-null="false" />
<property name="WantsNewsletter" column="ContactPersonWantsNewsletter" type="Boolean" not-null="false" />
<component name="ContactAddress" access="field.camelcase-underscore">
<property name="Street" column="ContactPersonStreet" type="String" length="50" not-null="true" />
<property name="Postcode" column="ContactPersonPostcode" type="String" length="50" not-null="true" />
<property name="City" column="ContactPersonCity" type="String" length="50" not-null="true" />
<property name="Country" column="ContactPersonCountry" type="String" length="50" not-null="false" />
<property name="FederalState" column="ContactPersonFederalState" type="String" length="50" not-null="false" />
</component>
<component name="ContactCommunicationData" access="field.camelcase-underscore">
<property name="TelephoneAreaCode" column="ContactPersonTelephoneAreaCode" type="String" length="50" not-null="false" />
<property name="TelephoneNumber" column="ContactPersonTelephoneNumber" type="String" length="50" not-null="false" />
<property name="MobilePhoneAreaCode" column="ContactPersonMobilePhoneAreaCode" type="String" length="50" not-null="false" />
<property name="MobilePhoneNumber" column="ContactPersonMobilePhoneNumber" type="String" length="50" not-null="false" />
<property name="FaxAreaCode" column="ContactPersonFaxAreaCode" type="String" length="50" not-null="false" />
<property name="FaxNumber" column="ContactPersonFaxNumber" type="String" length="50" not-null="false" />
<property name="Email" column="ContactPersonEmail" type="String" length="50" not-null="false" />
<property name="Webaddress" column="ContactPersonWebaddress" type="String" length="50" not-null="false" />
</component>
</composite-element>
</bag>
but it doesn't work.
Can anyone help me please?
regards
Kesch