From: <one...@us...> - 2002-12-30 11:32:53
|
Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate/tools/codegen/test In directory sc8-pr-cvs1:/tmp/cvs-serv21178/test Modified Files: Test.hbm.xml Test2.hbm.xml Log Message: integrated Max Andersen's patch to fix subclass constructors improved generated comments Index: Test.hbm.xml =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/tools/codegen/test/Test.hbm.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Test.hbm.xml 25 Dec 2002 04:44:02 -0000 1.4 --- Test.hbm.xml 30 Dec 2002 11:32:50 -0000 1.5 *************** *** 53,56 **** --- 53,57 ---- type="date"/> </subclass> + <subclass name="codegen.test.Group"> <list role="members" *************** *** 62,65 **** --- 63,77 ---- </list> </subclass> + + <!-- To test referring to subclass in another package --> + <subclass name="codegen.test.other.Group"> + <property name="simpleAttrib" type="string"/> + + <array role="otherGroups" element-class="codegen.test.User"> + <key column="principal"/> + <one-to-many class="codegen.test.User"/> + </array> + </subclass> + </class> Index: Test2.hbm.xml =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/tools/codegen/test/Test2.hbm.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Test2.hbm.xml 29 Dec 2002 01:30:54 -0000 1.3 --- Test2.hbm.xml 30 Dec 2002 11:32:50 -0000 1.4 *************** *** 5,18 **** <hibernate-mapping> <!-- Needs a identifier of type Long and no minimal constructor --> ! <class name="ObjIdNoMin"> <id name="id" type="long" unsaved-value="null"> <generator class="vm.long"/> </id> <property name="one" type="string" not-null="true"/> ! <many-to-one name="two" class="ClassB" not-null="true"/> </class> <!-- Needs constructors including the identifier and no minimal constructor --> ! <class name="ConstructorIdNoMin"> <id name="id" type="long"> <generator class="assigned"/> --- 5,18 ---- <hibernate-mapping> <!-- Needs a identifier of type Long and no minimal constructor --> ! <class name="codegen.test.ObjIdNoMin"> <id name="id" type="long" unsaved-value="null"> <generator class="vm.long"/> </id> <property name="one" type="string" not-null="true"/> ! <many-to-one name="two" class="codegen.test.ClassB" not-null="true"/> </class> <!-- Needs constructors including the identifier and no minimal constructor --> ! <class name="codegen.test.ConstructorIdNoMin"> <id name="id" type="long"> <generator class="assigned"/> *************** *** 22,26 **** <!-- Needs a constructor including the identifier and a minimal constructor --> ! <class name="ConstructorIdAndMin"> <id name="id" type="long"> <generator class="assigned"/> --- 22,26 ---- <!-- Needs a constructor including the identifier and a minimal constructor --> ! <class name="codegen.test.ConstructorIdAndMin"> <id name="id" type="long"> <generator class="assigned"/> *************** *** 30,34 **** <!-- Need both full and minimal constructor, includes a collection --> ! <class name="BothConstructors"> <id name="id" type="string"> <generator class="uuid.hex"/> --- 30,34 ---- <!-- Need both full and minimal constructor, includes a collection --> ! <class name="codegen.test.BothConstructors"> <id name="id" type="string"> <generator class="uuid.hex"/> *************** *** 38,42 **** <set role="recursiveColl"> <key type="long" column="bcid"/> ! <one-to-many class="BothConstructors"/> </set> </class> --- 38,42 ---- <set role="recursiveColl"> <key type="long" column="bcid"/> ! <one-to-many class="codegen.test.BothConstructors"/> </set> </class> *************** *** 44,48 **** <!-- dummy classes to make the test complete --> <!-- also tests support for classes with no properties --> ! <class name="ClassB"> <id name="id" type="int"> <generator class="uuid.hex"/> --- 44,48 ---- <!-- dummy classes to make the test complete --> <!-- also tests support for classes with no properties --> ! <class name="codegen.test.ClassB"> <id name="id" type="int"> <generator class="uuid.hex"/> *************** *** 50,54 **** </class> ! <class name="ClassA"> <id name="id" type="int"> <generator class="uuid.hex"/> --- 50,54 ---- </class> ! <class name="codegen.test.ClassA"> <id name="id" type="int"> <generator class="uuid.hex"/> *************** *** 56,62 **** </class> ! <class name="CompositeIdClass"> ! <composite-id name="composite" class="CompositeId"> ! <key-many-to-one name="classA" class="ClassA"/> <key-property name="name" type="string"/> </composite-id> --- 56,62 ---- </class> ! <class name="codegen.test.CompositeIdClass"> ! <composite-id name="composite" class="codegen.test.CompositeId"> ! <key-many-to-one name="classA" class="codegen.test.ClassA"/> <key-property name="name" type="string"/> </composite-id> *************** *** 65,71 **** </class> ! <class name="EmbeddedCompositeIdClass"> <composite-id> ! <key-many-to-one name="classA" class="ClassA"/> <key-property name="name" type="string"/> </composite-id> --- 65,71 ---- </class> ! <class name="codegen.test.EmbeddedCompositeIdClass"> <composite-id> ! <key-many-to-one name="classA" class="codegen.test.ClassA"/> <key-property name="name" type="string"/> </composite-id> |