Collection type "map" doesn't work
----------------------------------
Key: HIB-67
URL: http://thecla.homeftp.net:8380/jira/browse/HIB-67
Project: Hibernate Cartridge
Type: Bug
Versions: 3.0RC1
Reporter: Michal Bielecki
Assigned to: Martin West
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://thecla.homeftp.net:8380/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Andromda-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/andromda-devel