Joined: Tue May 24, 2005 3:44 am Posts: 1
|
Hi,
I’ve got a big problem with query building. I would like to find an Apteka where Cegla is “in” a set. I receive a set of IdCegla from WebBrowser.
I can’t find any solution. I tried Query by Example and HQL. Thanks for any advices.
There are xml files.
Apteka::
<?xml version="1.0"?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping> …… <class name="pl.com.webtel.webplat.struct.hibernate.TApteka" table="T_Apteka" > <id name="IdApteka" type="java.lang.Integer" > <column name="IdApteka" length="11" not-null="true" unique="true" sql-type="int" /> <generator class="native" /> </id> <many-to-one name="Tcegla" class="pl.com.webtel.webplat.struct.hibernate.TCegla" > <column name="IdCegla" length="11" not-null="false" /> </many-to-one>
……
</class> </hibernate-mapping>
Cegla::
<?xml version="1.0"?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping> <!-- Auto-generated mapping file from the hibernate.org cfg2hbm engine --> <class name="pl.com.webtel.webplat.struct.hibernate.TCegla" table="T_Cegla" > <id name="IdCegla" type="java.lang.Integer" > <column name="IdCegla" length="11" not-null="true" unique="true" sql-type="int" /> <generator class="native" /> </id> …… <set name="SetOfTApteka" > <key> <column name="IdCegla" length="11" not-null="false" /> </key> <one-to-many class="pl.com.webtel.webplat.struct.hibernate.TApteka" /> </set> ……… </class> </hibernate-mapping>
Thanks
Mathew
|
|