java - Hibernate doesn't save object -
i've created table ip , created mapping files wizards on netbeans 8.2. thats ip schema:
and added hibernate config
<property name="connection.autocommit">true</property>
but when i'm trying insert table query doesn't executes. on other tables works.
session session = hibernateutil.getsessionfactory().opensession(); ip info = new ip(); info.setasn("aaaa"); info.setcity("aaaa"); info.setcountry("aa"); info.setip(213213); info.setisp("aaaa"); info.setlat(44.4); info.setlon(55.5); info.setorg("aaaa"); info.setregion("aaaa"); session.save(info);
you need invoke session.flush()
.
autocommit it's pushing data database without invoking save
method.
Comments
Post a Comment