[ http://jira.andromda.org/browse/HIB-67?page=history ]
     
Work on HIB-67 started by Carlos Cuenca

> Collection type "map" doesn't work
> ----------------------------------
>
>          Key: HIB-67
>          URL: http://jira.andromda.org/browse/HIB-67
>      Project: Hibernate Cartridge
>         Type: Bug
>     Versions: 3.0RC1
>     Reporter: Michal Bielecki
>     Assignee: Carlos Cuenca
>     Priority: Minor

>
> In my model there are two entities: Property(name, value) and Entity(...)
> Assosiation End A
> name: entity
> multiplicity: 1
> Element A: Entity
> Assosiation End B
> name: properties
> multiplicity: 0..*
> Element B: Property
> Assosiation end B is taggeg with:
> andromda.hibernate.collection.type=map
> andromda.hibernate.collection.index=name
> In generated hbm file there is:
>         <map name="properties" order-by="ENTITY_FK" lazy="false" 
> outer-join="auto" inverse="true" cascade="delete">
>             <key>
>                 <column name="ENTITY_FK"/>
>             </key>
>             <one-to-many 
> class="pl.com.bull.pifc.repository.persistence.PropertyImpl"/>
>         </map>
> 1. <one-to-many> element is generated, is produces an error:
> SEVERE: Could not configure datastore from file: ...
>       net.sf.hibernate.MappingException: invalid mapping
>               at 
> net.sf.hibernate.cfg.Configuration.addFile(Configuration.java:174)
>               at 
> net.sf.hibernate.tool.hbm2ddl.SchemaExport.main(SchemaExport.java:289)
>       Caused by: org.xml.sax.SAXParseException: Element "map" does not allow 
> "one-to-many" here.
> 2. <index> element is not generated
> 3. In java file properties is of wrong type: Collection instead of Map
> SNAPHSOT-RC1 (09-03-2005)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.andromda.org/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira



-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events, 4
opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20
_______________________________________________
Andromda-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/andromda-devel

Reply via email to