java - relationship set between table and mapping table to use joins -


i have 2 table "module" table , "staffmodule" i'm wanting display list of modules staff present on staffmodule mapping table.

i've tried

from module join staffmodule sm id = sm.mid 

with no luck, following error

path expected join!

however thought had correct join allow not can 1 help

staffmodule hbm

<?xml version="1.0" encoding="utf-8"?> <!doctype hibernate-mapping public "-//hibernate/hibernate mapping dtd 3.0//en" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> <!-- generated apr 26, 2010 9:50:23 hibernate tools 3.2.1.ga --> <hibernate-mapping>   <class name="hibernate.staffmodule" schema="walk" table="staffmodule">     <composite-id class="hibernate.staffmoduleid" name="id">         <key-many-to-one name="mid" class="hibernate.module">             <column name="mid"/>         </key-many-to-one>       <key-property name="staffid" type="int">         <column name="staffid"/>       </key-property>     </composite-id>   </class> </hibernate-mapping> 

and module.hbm

<?xml version="1.0" encoding="utf-8"?> <!doctype hibernate-mapping public "-//hibernate/hibernate mapping dtd 3.0//en" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> <!-- generated apr 26, 2010 9:50:23 hibernate tools 3.2.1.ga --> <hibernate-mapping>   <class name="hibernate.module" schema="walk" table="module">     <id name="id" type="int">       <column name="id"/>       <generator class="assigned"/>     </id>     <property name="modulename" type="string">       <column length="50" name="modulename"/>     </property>     <property name="teacherid" type="int">       <column name="teacherid" not-null="true"/>     </property>   </class> 

hope thats enough information!

and in advance.


Comments

Popular posts from this blog

Delphi Wmi Query on a Remote Machine -