I am trying to do insert using hibernate and am running into an issue. When I use the following code
@Override
public Serializable addTestResult(Result test_result) {
// TODO Auto-generated method stub
return getCurrentSession().save(test_result);
}
the end query looks like this:
mysql> insert into test_results (db, host) values ('db1', 'host1');
which gets rejected by mysql since there are left tick missing in the column name. How can I have hibernate add quotes around the column name so that the query looks like this:
mysql> insert into test_results (`db`, `host`) values ('db1', 'host1');