Hi All I am trying use the Single Entity Mapped to Multiple Tables . I have two tables Order and OrderHistory. Order is given the entity-name ''OrderObj'' and ''OrderHist'' respectively
when the HibernateUtil.beginTransaction() getSession().save(''OrderObj'',order) and getSession().save(''OrderHist'',order) HibernateUtil.commitTransaction()
are called within the same transaction only OrderObj is saved and not OrderHist
but if they are saved by starting different transactions both of them are saved . HibernateUtil.beginTransaction() getSession().save(''OrderObj'',order) HibernateUtil.commitTransaction()
HibernateUtil.beginTransaction() getSession().save(''OrderHist'',order) HibernateUtil.commitTransaction()
what may be the issue.
Both the tables have the same columns names except one extra column in OrderHist
Please advise
|