Remember me
Password recovery

People worldating rumap

In this example, if a ‘Stock’ is saved, all its referenced ‘stock Daily Records’ should be saved into database as well. Stock Daily Record sdr1 = (Stock Daily Record)session.get(Stock Daily Record.class, new Integer(56)); Stock Daily Record sdr2 = (Stock Daily Record)session.get(Stock Daily Record.class, new Integer(57)); Stock stock = (Stock)session.get(Stock.class, new Integer(2)); Stock Daily Records().remove(sdr1); Stock Daily Records().remove(sdr2); Or Update(stock); Further study – Cascade – JPA & Hibernate annotation common mistake.