In Eclipse, include the following JARs:
XML Mapping files:
hibernate.cfg.xml & all *.hbm.xml should be in the BIN/ folder.
To circumvent this:
Run Configuration->Classpath->User Entries
Advanced...->Add Folder: src/
Multiple primary keys:
<hibernate-mapping> <class name="org.path.to.class" table="myTablename"> <composite-id> <key-property name="columnName_id_1"/> <key-property name="columnName_id_2"/> <key-property name="columnName_id_X"/> </composite-id> <property name="columnName_1" /> <property name="columnName_2" /> <property name="columnName_3" /> <property name="columnName_4" /> <property name="columnName_X" /> </class> </hibernate-mapping>
public class myTablename implements Serializable { ... }
Add this
log4j.logger.org.hibernate.type=trace
hibernate dynamic-update
Eclipse install: http://download.jboss.org/jbosstools/updates/stable/