Java tutorial
import model.entity.Supplier; import org.hibernate.Session; /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ /** * * @author LapTop */ public class testUTF { public static void main(String[] args) { Supplier sup = new Supplier(); sup.setName("?i l ht b Ch? Mt T"); sup.setId(6); Session ses = utils.HibernateUtils.getSessionFactory().getCurrentSession(); ses.beginTransaction(); ses.saveOrUpdate(sup); ses.getTransaction().commit(); System.exit(0); } }