Its not working for me. On running code its giving me exception following is the output:-
log4j:WARN No appenders could be found for logger (org.hibernate.cfg.Environment). log4j:WARN Please initialize the log4j system properly. Hibernate: select insurance0_.ID as ID0_, insurance0_.insurance_name as insurance2_2_0_, insurance0_.invested_amount as invested3_2_0_, insurance0_.investement_date as investem4_2_0_ from insurance insurance0_ where insurance0_.ID=? exception setting property value with CGLIB (set hibernate.cglib.use_reflection_optimizer=false for more info) setter of roseindia.tutorial.hibernate.Insurance.setInvestementAmount
Also if we get instance then why ins.getInvestementAmount() is not giving me anything.