Z
ZelluX
Hi, all
I have a problem when saving my bean to the MySQL server using
Hibernate.
Here's the code snippet when saving the bean
Session session = HibernateSessionFactory.getSession();
Transaction tx = session.beginTransaction();
session.save(user);
tx.commit();
But it throws an exception, which contains
Caused by: java.sql.BatchUpdateException: You have an error in your
SQL syntax; check the manual that corresponds to your MySQL server
version for the right syntax to use near 'name, gender, birthday,' at
line 1
Then how to find out that sql query string generated by hibernate?
Or any other way to debug it?
Many thanks
I have a problem when saving my bean to the MySQL server using
Hibernate.
Here's the code snippet when saving the bean
Session session = HibernateSessionFactory.getSession();
Transaction tx = session.beginTransaction();
session.save(user);
tx.commit();
But it throws an exception, which contains
Caused by: java.sql.BatchUpdateException: You have an error in your
SQL syntax; check the manual that corresponds to your MySQL server
version for the right syntax to use near 'name, gender, birthday,' at
line 1
Then how to find out that sql query string generated by hibernate?
Or any other way to debug it?
Many thanks