I am running Emp-Dept one-to- many example with Eclipse 3.2 and hibernate3.2 When I run the cclient, hibernate is not responding. It is just printing the following message on the console....
Starting ..
Saving data for Emp..
Hibernate: select emp_.empno, emp_.deptno, emp_.sal as sal0_, emp_.loc as loc0_ from EMP emp_ where emp_.empno=? and emp_.deptno=? Hibernate: insert into DEPT (deptname, empno, deptno) values (?, ?, ?) When I am taking out the relationship its working fine, if somethng is wrong with mapping or somewhere else ... why Hibernate is not complaing abt error rather than sitting quit??? And,
thread is ALIVE.
Below is code.
Dept.java
---------------------------------------------------------------
DeptKey.java (Composite PK Class)
---------------------------------------------------------------
Emp.java
---------------------------------------------------------------
EmpKey.java
---------------------------------------------------------------
dept.hbm.xml
---------------------------------------------------------------
emp.hbm.xml
---------------------------------------------------------------
Client.java
---------------------------------------------------------------
-----------------------------------------
SQL> desc emp
Name Null? Type
----------------------------------------- -------- ----------------
EMPNO NOT NULL VARCHAR2(10)
DEPTNO NOT NULL VARCHAR2(10)
SAL VARCHAR2(10)
LOC VARCHAR2(10)
Note : empno and deptno is PK there is no FK
SQL> desc dept
Name Null? Type
----------------------------------------- -------- -----------------------
EMPNO NOT NULL VARCHAR2(10)
DEPTNO NOT NULL VARCHAR2(10)
DEPTNAME VARCHAR2(10)
Note : empno and deptno is PK there is no FK
Please share your idea on this.