The following comment has been added to this issue: Author: Peilin Zhang Created: Mon, 18 Apr 2005 9:08 AM Body: You need to include the @hibernate.collection-key tag (without the column parameter even though the doc says it is mandatory). --------------------------------------------------------------------- View this comment: http://opensource.atlassian.com/projects/xdoclet/browse/XDT-1161?page=comments#action_16391
--------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/xdoclet/browse/XDT-1161 Here is an overview of the issue: --------------------------------------------------------------------- Key: XDT-1161 Summary: hibernate.collection-key-column does not seem to work Type: Bug Status: Open Priority: Major Original Estimate: Unknown Time Spent: Unknown Remaining: Unknown Project: XDoclet Components: Hibernate Module Assignee: xdoclet-devel (Use for new issues) Reporter: vishy kasar Created: Thu, 18 Nov 2004 6:48 PM Updated: Mon, 18 Apr 2005 9:08 AM Description: I have the following simple Test Java file to reproduce the issue. The generated hbm.xml seem to be missing the key element. package solutionCapability; import java.util.*; /** * @hibernate.class * table="TEST" * */ public class Test { private Set goodies = new HashSet(); private Long id; /** * @hibernate.set * lazy="true" * cascade="none" * @w name="CAPABILITY_ID" * @hibernate.collection-key-column name="ENTITY_ID" * @hibernate.collection-key-column name="CAPACITY_ID" * @hibernate.collection-one-to-many * class="solutionCapability.VoiceCapability" */ public Set getGoodies() { return goodies; } /** * @hibernate.id * generator-class="native" * unsaved-value="null" * @hibernate.column name="TEST_ID" unique="true" */ public Long getId() { return id; } public void setGoodies(Set goodies) { this.goodies = goodies; } public void setId(Long id) { this.id = id; } } Generated HBM file is as follows: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 2.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd"> <hibernate-mapping > <class name="solutionCapability.Test" table="TEST" > <id name="id" type="java.lang.Long" unsaved-value="null" > <column name="TEST_ID" unique="true" /> <generator class="native"> <!-- To add non XDoclet generator parameters, create a file named hibernate-generator-params-Test.xml containing the additional parameters and place it in your merge dir. --> </generator> </id> <set name="goodies" lazy="true" cascade="none" sort="unsorted" > <one-to-many class="solutionCapability.VoiceCapability" /> </set> <!-- To add non XDoclet property mappings, create a file named hibernate-properties-Test.xml containing the additional properties and place it in your merge dir. --> </class> </hibernate-mapping> --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/xdoclet/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 _______________________________________________ xdoclet-devel mailing list xdoclet-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xdoclet-devel