Update of
/cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-hibernate/src/test/java/org/xdoclet/plugin/hibernate/pojo
In directory
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5518/src/test/java/org/xdoclet/plugin/hibernate/pojo
Modified Files:
AnyMapping.hbm.xml AnyMapping.java
CompositeMapKeyMapping.hbm.xml CompositeMapKeyMapping.java
MapMapping.hbm.xml MapMapping.java
Log Message:
Added support of @hibernate.many-to-any feature
Index: MapMapping.java
===================================================================
RCS file:
/cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-hibernate/src/test/java/org/xdoclet/plugin/hibernate/pojo/MapMapping.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** MapMapping.java 26 Apr 2005 07:00:17 -0000 1.6
--- MapMapping.java 17 May 2005 12:42:54 -0000 1.7
***************
*** 33,36 ****
--- 33,59 ----
/**
+ * @hibernate.id unsaved-value="blurge" generator-class="native"
+ */
+ public long getId() {
+ return 0;
+ }
+
+ /**
+ * Test many to any generation
+ *
+ * @hibernate.map
+ * @hibernate.key column="baz"
+ * @hibernate.index-many-to-any id-type="long"
+ * @hibernate.index-column name="ind_clazz_"
+ * @hibernate.index-column name="ind_id_"
+ * @hibernate.many-to-any id-type="long"
+ * @hibernate.column name="el_clazz_"
+ * @hibernate.column name="el_id_"
+ */
+ public Map getManyToAny() {
+ return _map;
+ }
+
+ /**
* test one-to-many set
*
Index: CompositeMapKeyMapping.java
===================================================================
RCS file:
/cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-hibernate/src/test/java/org/xdoclet/plugin/hibernate/pojo/CompositeMapKeyMapping.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** CompositeMapKeyMapping.java 16 May 2005 17:56:45 -0000 1.1
--- CompositeMapKeyMapping.java 17 May 2005 12:42:54 -0000 1.2
***************
*** 24,33 ****
* @hibernate.key-property
*/
! private Long keySN;
!
/**
* @hibernate.key-property
*/
! private Long keyField;
/**
--- 24,32 ----
* @hibernate.key-property
*/
! private Long keyField;
/**
* @hibernate.key-property
*/
! private Long keySN;
/**
Index: AnyMapping.java
===================================================================
RCS file:
/cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-hibernate/src/test/java/org/xdoclet/plugin/hibernate/pojo/AnyMapping.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** AnyMapping.java 12 May 2005 13:47:24 -0000 1.4
--- AnyMapping.java 17 May 2005 12:42:54 -0000 1.5
***************
*** 13,17 ****
public class AnyMapping {
/**
! * @hibernate.any id-type="string"
* @hibernate.column name="glum"
*/
--- 13,17 ----
public class AnyMapping {
/**
! * @hibernate.any id-type="string" meta-type="ProductClass"
* @hibernate.column name="glum"
*/
Index: MapMapping.hbm.xml
===================================================================
RCS file:
/cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-hibernate/src/test/java/org/xdoclet/plugin/hibernate/pojo/MapMapping.hbm.xml,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** MapMapping.hbm.xml 26 Apr 2005 07:00:17 -0000 1.9
--- MapMapping.hbm.xml 17 May 2005 12:42:54 -0000 1.10
***************
*** 1,7 ****
<?xml version="1.0" encoding="ISO-8859-1"?>
! <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD
2.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
<hibernate-mapping>
<class name="org.xdoclet.plugin.hibernate.pojo.MapMapping"
table="map-table">
<map name="element">
<key/>
--- 1,10 ----
<?xml version="1.0" encoding="ISO-8859-1"?>
! <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD
3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class name="org.xdoclet.plugin.hibernate.pojo.MapMapping"
table="map-table">
+ <id name="id" unsaved-value="blurge">
+ <generator class="native"/>
+ </id>
<map name="element">
<key/>
***************
*** 9,12 ****
--- 12,26 ----
<element not-null="false" type="string" column="value"
unique="false"/>
</map>
+ <map name="manyToAny">
+ <key column="baz"/>
+ <index-many-to-any id-type="long">
+ <column name="ind_clazz_"/>
+ <column name="ind_id_"/>
+ </index-many-to-any>
+ <many-to-any id-type="long">
+ <column name="el_clazz_"/>
+ <column name="el_id_"/>
+ </many-to-any>
+ </map>
<map name="oneToMany" lazy="true" outer-join="auto" schema="baz"
inverse="false" where="bar" sort="blabla" order-by="foo" cascade="all"
table="blurge">
<key/>
Index: CompositeMapKeyMapping.hbm.xml
===================================================================
RCS file:
/cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-hibernate/src/test/java/org/xdoclet/plugin/hibernate/pojo/CompositeMapKeyMapping.hbm.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** CompositeMapKeyMapping.hbm.xml 16 May 2005 17:56:45 -0000 1.1
--- CompositeMapKeyMapping.hbm.xml 17 May 2005 12:42:54 -0000 1.2
***************
*** 7,12 ****
<key/>
<composite-map-key
class="org.xdoclet.plugin.hibernate.pojo.CompositeMapKeyMapping$CompositeMapKey">
- <key-property access="field" name="keySN"/>
<key-property access="field" name="keyField"/>
<key-many-to-one name="simple"/>
</composite-map-key>
--- 7,12 ----
<key/>
<composite-map-key
class="org.xdoclet.plugin.hibernate.pojo.CompositeMapKeyMapping$CompositeMapKey">
<key-property access="field" name="keyField"/>
+ <key-property access="field" name="keySN"/>
<key-many-to-one name="simple"/>
</composite-map-key>
Index: AnyMapping.hbm.xml
===================================================================
RCS file:
/cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-hibernate/src/test/java/org/xdoclet/plugin/hibernate/pojo/AnyMapping.hbm.xml,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** AnyMapping.hbm.xml 12 May 2005 13:47:24 -0000 1.4
--- AnyMapping.hbm.xml 17 May 2005 12:42:54 -0000 1.5
***************
*** 9,13 ****
<column name="glum"/>
</any>
! <any id-type="string" access="field" name="field"
meta-type="Hibernate.CLASS">
<column name="glum"/>
</any>
--- 9,13 ----
<column name="glum"/>
</any>
! <any id-type="string" access="field" name="field"
meta-type="ProductClass">
<column name="glum"/>
</any>
-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click
_______________________________________________
xdoclet-plugins-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xdoclet-plugins-commits