Why we are using cascading in Java?? What is its importance. Here i am using for save and update
Stock stock = new Stock();
StockDailyRecord stockDailyRecords = new StockDailyRecord();
//set the stock and stockDailyRecords data
stockDailyRecords.setStock(stock);
stock.getStockDailyRecords().add(stockDailyRecords);
session.save(stock);
session.save(stockDailyRecords);
Is there any alternate way for cascading.?