Support for Map Import

Discussion of open issues, suggestions and bugs regarding Entity Developer - ORM modeling and code generation tool
Post Reply
nico193
Posts: 3
Joined: Fri 06 Nov 2015 10:04

Support for Map Import

Post by nico193 » Fri 06 Nov 2015 10:18

Good Morning,

I have a problem concerning a model import. The following hbm file does not import correctly :

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<hibernate-mapping xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" namespace="Entity.Buisness" assembly="Entity, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" xmlns="urn:nhibernate-mapping-2.2">
  <class name="CommandeClient" table="COMMANDE_CLIENT">
    <cache usage="nonstrict-read-write" region="buisness" />
    <id name="Id" column="ID" type="Guid">
      <generator class="guid" />
    </id>
    <property name="NoCommande" type="AnsiString" column="NO_COMMANDE" length="10" />
    <bag name="LignesCommandeClient" inverse="true" cascade="all" batch-size="100">
      <key column="COMMANDE_CLIENT_ID" on-delete="cascade" />
      <one-to-many class="LigneCommandeClient" />
    </bag>
    <map name="Proprietes" table="COMMANDE_CLIENT_PROP" lazy="false" batch-size="100" fetch="join">
      <cache usage="nonstrict-read-write" region="buisness" />
      <key column="COMMANDE_CLIENT_ID" foreign-key="CMDE_CLI_PROP_CMDE_CLI_FK" />
      <map-key column="CLE" type="AnsiString" length="100" />
      <element column="VALEUR" type="AnsiString" length="4000" />
    </map>
  </class>
</hibernate-mapping>
The error message is : "Collection 'Proprietes' is of unsupported kind. Only <one-to-many> and <many-to-many> collections are supported."

The goal is to map a normalized table with Key/Value properties mapped as dictionaries <string,string>.

Is this functionality will be implemented in the future ?

Thank you
Nicolas

MariiaI
Devart Team
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: Support for Map Import

Post by MariiaI » Fri 06 Nov 2015 14:31

nico193 wrote:The error message is : "Collection 'Proprietes' is of unsupported kind. Only <one-to-many> and <many-to-many> collections are supported."
The goal is to map a normalized table with Key/Value properties mapped as dictionaries <string,string>.
Is this functionality will be implemented in the future ?
No, there is no such plans.
Please refer to the documentation to get more information regarding working with associations in Entity Developer:
http://www.devart.com/entitydeveloper/e ... eloper.chm > ORM Support > NHibernate > Concepts > Working with Associations
JIC: Entity Developer documentation is also available with the installation package (the "Help" component should have been selected when installing).

We also recommend our users to take a look at NHibernate Mapping Samples: http://www.devart.com/entitydeveloper/n ... mples.html

Post Reply