jzhuo wrote:
Sorry, I made a mistake, i should not set constrained="true" at the hand of ClassA.
But, how can write this relation with XDOCLET?
sorry again and thanks a lot!
OK, I find the methods to solve these two problems:
(1) to foreign generator class, I find a undocumented paramater named "hibernate.generator-param" that can define the "prperty" param of foreign generator-class.
(2) to multi-column element of 
key, I try to modify the hibernate-collections.xdt file in  xdoclet-hibernate-module-1.2b4.jar as following:
before modified:
Code:
          <XDtMethod:ifHasMethodTag tagName="hibernate.collection-key">
              <key
                <XDtHibernate:setCurrentTag name="hibernate.collection-key" mappingElement="key">
                  <XDtMerge:merge file="xdoclet/modules/hibernate/resources/hibernate-column.xdt">
                  </XDtMerge:merge>
                </XDtHibernate:setCurrentTag>
          </XDtMethod:ifHasMethodTag>
after modified:
Code:
          <XDtMethod:ifHasMethodTag tagName="hibernate.collection-key">
              <key
                <XDtConfig:ifConfigParamEquals paramName="version" value="2.0">
                  <XDtMethod:ifHasMethodTag tagName="hibernate.collection-key" paramName="foreign-key">
                    foreign-key="<XDtMethod:methodTagValue tagName="hibernate.collection-key" paramName="foreign-key" />"
                  </XDtMethod:ifHasMethodTag>
                </XDtConfig:ifConfigParamEquals>
                <XDtConfig:ifConfigParamEquals paramName="version" value="1.1">
                  <XDtMethod:ifHasMethodTag tagName="hibernate.collection-key" paramName="length">
                    length="<XDtMethod:methodTagValue tagName="hibernate.collection-key" paramName="length"/>"
                  </XDtMethod:ifHasMethodTag>
                </XDtConfig:ifConfigParamEquals>
                <XDtHibernate:setCurrentTag name="hibernate.collection-key" mappingElement="key">
                  <XDtMerge:merge file="xdoclet/modules/hibernate/resources/hibernate-column.xdt">
                  </XDtMerge:merge>
                </XDtHibernate:setCurrentTag>
          </XDtMethod:ifHasMethodTag>
David, is it OK? can you help me check the synax?thanks!