Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate/test
In directory sc8-pr-cvs1:/tmp/cvs-serv23541
Modified Files:
LessSimple.java Multi.hbm.xml MultiTableTest.java
Log Message:
test for normalized table query bugs
Index: LessSimple.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/test/LessSimple.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** LessSimple.java 26 Nov 2002 03:35:44 -0000 1.4
--- LessSimple.java 19 Dec 2002 10:47:50 -0000 1.5
***************
*** 2,5 ****
--- 2,6 ----
package cirrus.hibernate.test;
+ import java.util.List;
import java.util.Set;
***************
*** 8,11 ****
--- 9,13 ----
private String foo;
private Set set;
+ private List bag;
private Simple another;
private LessSimple yetanother;
***************
*** 88,91 ****
--- 90,109 ----
public void setYetanother(LessSimple yetanother) {
this.yetanother = yetanother;
+ }
+
+ /**
+ * Returns the bag.
+ * @return List
+ */
+ public List getBag() {
+ return bag;
+ }
+
+ /**
+ * Sets the bag.
+ * @param bag The bag to set
+ */
+ public void setBag(List bag) {
+ this.bag = bag;
}
Index: Multi.hbm.xml
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/test/Multi.hbm.xml,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** Multi.hbm.xml 26 Nov 2002 08:37:26 -0000 1.17
--- Multi.hbm.xml 19 Dec 2002 10:47:51 -0000 1.18
***************
*** 13,17 ****
<joined-subclass name="cirrus.hibernate.test.LessSimple" table="leafsubclass">
! <key column="id_"/>
<property name="intprop" not-null="true"/>
<one-to-one name="other" class="cirrus.hibernate.test.LessSimple"/>
--- 13,17 ----
<joined-subclass name="cirrus.hibernate.test.LessSimple" table="leafsubclass">
! <key column="id__"/>
<property name="intprop" not-null="true"/>
<one-to-one name="other" class="cirrus.hibernate.test.LessSimple"/>
***************
*** 23,26 ****
--- 23,30 ----
<one-to-many class="cirrus.hibernate.test.Simple"/>
</set>
+ <bag role="bag" lazy="true" table="simple_simple">
+ <key column="simple1"/>
+ <many-to-many column="simple2" class="cirrus.hibernate.test.Simple"/>
+ </bag>
</joined-subclass>
Index: MultiTableTest.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/test/MultiTableTest.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** MultiTableTest.java 15 Dec 2002 04:54:41 -0000 1.15
--- MultiTableTest.java 19 Dec 2002 10:47:51 -0000 1.16
***************
*** 112,115 ****
--- 112,118 ----
s.find("from sm in class SubMulti").size()==1
);
+
+ s.find("from ls in class LessSimple, s in ls.bag.elements where s.id is not null");
+
t.commit();
s.close();
|