Hi There,
Have tried the Hibernate forum on this but no avail. I am trying the following.
e.g.
public void saveProduct(Product p) {
getHibernateTemplate().saveOrUpdate(p);
}
Hibernate Mapping File Sample
I get the folllwing error:Code:<class
name="Product"
table="products"
>
<meta attribute="class-description" inherit="false">
@hibernate.class
table="products"
</meta>
<id
name="id"
type="java.lang.Integer"
column="ID"
>
<meta attribute="field-description">
@hibernate.id
generator-class="native"
type="java.lang.Integer"
column="ID"
</meta>
<generator class="native" />
</id>
I set autcommit in MYSql to be false as follows.Code:Translating SQLException with SQLState 'null' and errorCode '0' and message [Can't call commit when autocommit=true]; SQL was [null] for task [HibernateAccessor]
Any Ideas would be helpful on this one. I can read fine from the datbase its the inserts thats causing me pain.Code:set autocommit=0;
mysql> select @@autocommit;
+--------------+
| @@autocommit |
+--------------+
| 0 |
+--------------+
Thanks in advance.
