posted 9 years ago
I am new to hibernate. I have written a simple program with four files in it.
Employee.java it is a bean class with getters n setters in it.
hibernate.cfg.xml
Employee.hbm.xml
StoreData.java
I have created table using the following sql statement
create table employee (empid number(2,2),empname VARCHAR2(30), empdept varchar2(10), empsal number(5,2));
But when I run this program i get the following error:
org.hibernate.PersistentObjectException: detached entity passed to persist: hibernate_prj.Employee
Please help to resolve this