From: <one...@us...> - 2003-01-16 20:52:42
|
Update of /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/tool/hbm2java/test In directory sc8-pr-cvs1:/tmp/cvs-serv8417/net/sf/hibernate/tool/hbm2java/test Modified Files: Test.hbm.xml Test2.hbm.xml config.xml Log Message: applied Max Andersen's patch for <meta>attributes in hbm2java Index: Test.hbm.xml =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/tool/hbm2java/test/Test.hbm.xml,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** Test.hbm.xml 1 Jan 2003 13:57:52 -0000 1.1.1.1 --- Test.hbm.xml 16 Jan 2003 20:52:38 -0000 1.2 *************** *** 1,15 **** <?xml version="1.0"?> ! <!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping.dtd" > <hibernate-mapping> <class name="codegen.test.BasicPrincipal" ! table="tblPrincipal" ! discriminator="subclass"> <id name="id" type="java.lang.String"> <generator class="uuid.hex"/> </id> <property name="name" ! type="java.lang.String"/> <property name="count" type="int"/> --- 1,25 ---- <?xml version="1.0"?> ! <!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" > <hibernate-mapping> + <meta attribute="scope-class">public</meta> + <meta attribute="scope-set">protected</meta> + <class name="codegen.test.BasicPrincipal" ! table="tblPrincipal"> ! <meta attribute="description"> ! BasicPrinicpal is just a basic principal. And it got some javadoc too! ! @see Guest ! @author xam ! </meta> <id name="id" type="java.lang.String"> <generator class="uuid.hex"/> </id> + <discriminator column="subclass"/> <property name="name" ! type="java.lang.String"> ! <meta attribute="description">An ordinary field with some more javadoc :)</meta> ! </property> <property name="count" type="int"/> *************** *** 30,46 **** </component> ! <array role="permissions" element-class="codegen.test.AbstractPermission"> <key column="principal"/> ! <index colum="order"/> <one-to-many class="codegen.test.Permission"/> </array> ! <primitive-array role="logins"> <key column="principal"/> ! <index colum="order"/> <element type="timestamp"/> </primitive-array> ! <bag role="names"> <key column="principal"/> <element type="string"/> --- 40,56 ---- </component> ! <array name="permissions" element-class="codegen.test.AbstractPermission"> <key column="principal"/> ! <index column="order"/> <one-to-many class="codegen.test.Permission"/> </array> ! <primitive-array name="logins"> <key column="principal"/> ! <index column="order"/> <element type="timestamp"/> </primitive-array> ! <bag name="names"> <key column="principal"/> <element type="string"/> *************** *** 48,51 **** --- 58,62 ---- <subclass name="codegen.test.User" proxy="codegen.test.IUser"> + <meta attribute="generated-class">codegen.auto.test.AutoUser</meta> <property name="email" type="string"/> *************** *** 55,59 **** <subclass name="codegen.test.Group"> ! <list role="members" table="tblGroupMembers"> <key column="groupId"/> --- 66,71 ---- <subclass name="codegen.test.Group"> ! <meta attribute="extends">codegen.test.AbstractPersistentWhichIsBogusBecauseItisAnSubclass</meta> ! <list name="members" table="tblGroupMembers"> <key column="groupId"/> *************** *** 68,73 **** <property name="simpleAttrib" type="string"/> ! <array role="otherGroups" element-class="codegen.test.User"> <key column="principal"/> <one-to-many class="codegen.test.User"/> </array> --- 80,86 ---- <property name="simpleAttrib" type="string"/> ! <array name="otherGroups" element-class="codegen.test.User"> <key column="principal"/> + <index column="idx"/> <one-to-many class="codegen.test.User"/> </array> *************** *** 76,83 **** </class> ! <class name="codegen.test.Person"> ! <id name="id" type="string"><generator class="assigned"/></id> ! <one-to-one name="myUser" class="codegen.test.User"/> ! </class> </hibernate-mapping> --- 89,112 ---- </class> ! <class name="codegen.test.Person"> ! <meta attribute="extends">codegen.test.AbstractPersistent</meta> ! <meta attribute="implements">codegen.test.IVersionable</meta> ! <meta attribute="implements">codegen.test.IAuditable</meta> ! <meta attribute="generated-class">codegen.test.AutoPerson</meta> ! <meta attribute="description"> ! AutoPerson is a simple class, which illustrates the possibilities of the Hibernate meta tag. ! @author Zim Zala Bim ! </meta> ! ! <id name="id" type="string"><generator class="assigned"/></id> ! <one-to-one name="myUser" class="codegen.test.User"/> ! <property name="name" type="string"> ! <meta attribute="scope-get">public</meta> ! <meta attribute="scope">protected</meta> ! <meta attribute="description">A javadoc comment for the field name...</meta> ! </property> ! <property name="aDate" type="date"> ! </property> ! </class> </hibernate-mapping> Index: Test2.hbm.xml =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/tool/hbm2java/test/Test2.hbm.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Test2.hbm.xml 9 Jan 2003 12:24:52 -0000 1.2 --- Test2.hbm.xml 16 Jan 2003 20:52:38 -0000 1.3 *************** *** 1,4 **** <?xml version="1.0"?> ! <!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping-1.1.dtd" > --- 1,4 ---- <?xml version="1.0"?> ! <!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" > *************** *** 36,41 **** <property name="one" type="big_decimal" not-null="true"/> <property name="two" type="string"/> ! <set role="recursiveColl"> ! <key type="long" column="bcid"/> <one-to-many class="codegen.test.BothConstructors"/> </set> --- 36,41 ---- <property name="one" type="big_decimal" not-null="true"/> <property name="two" type="string"/> ! <set name="recursiveColl"> ! <key column="bcid"/> <one-to-many class="codegen.test.BothConstructors"/> </set> Index: config.xml =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/tool/hbm2java/test/config.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** config.xml 13 Jan 2003 08:57:43 -0000 1.2 --- config.xml 16 Jan 2003 20:52:38 -0000 1.3 *************** *** 1,2 **** --- 1,3 ---- + <?xml version="1.0"?> <!-- <generate renderer="" *************** *** 8,11 **** --> <codegen> ! <generate renderer="net.sf.hibernate.tool.hbm2java.BasicRenderer"/> </codegen> --- 9,13 ---- --> <codegen> ! <meta attribute="implements">codegen.test.IAuditable</meta> ! <generate renderer="net.sf.hibernate.tool.hbm2java.BasicRenderer"/> </codegen> |