How to insert a new row with new values (without copying from another object) in HQL..?
===

I am using Hibernate.

And i want to persistently store a new row with new values (Without copying from another object) into my database with HQL.

My code in struts action class used to insert a new row is :

    public String execute() throws Exception {
            Users u = null;
            try {
                Session session = HibernateUtil.getSessionFactory().getCurrentSession();
                session.beginTransaction();
                u = new Users();
                u.setAge(getAge());
                u.setCity(getCity());
                u.setEmail(getEmail());
                u.setName(getUsername());
                u.setPassword(getPassword());
                u.setSex(getSex());
                session.save(u);
                session.getTransaction().commit();
            } catch (Exception e) {
                this.addActionError("Oops. And Error Encountered...!");
            }
            return SUCCESS;
        }




Code successfully executes without any error. But it is not being persistently stored in my database. I can not see a new row in the database. What can be the error.?

Or if there is any other way to insert a new row with HQL then please tell.


Thanks in advance.