Hi,
I'm using MySql 4.1 (innoDB is enabled) and hibernate tools 2.0.1. Every time I start my webapp server I check some tables and I'm getting the following error message:
ALLVARLIG: Syntax error or access violation, message from server: "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 'true (fk_customer), add constraint true foreign key (fk_customer) references `Cu' at line 1"
org.hibernate.tool.hbm2ddl.SchemaUpdate execute
This is a part of the hbm.xml mappings:
<hibernate-mapping default-cascade="none">
<class name="Customer"
table="`Customer`">
<id name="id" type="java.lang.Integer">
<generator class="increment" />
</id>
<property name="companyName" not-null="false" type="java.lang.String" unique="false"/>
<set name="report" cascade="all">
<key column="fk_customer" foreign-key="true"/>
<one-to-many class="Report"/>
</set>
<class name="Report"
table="`Report`">
<id name="id" type="java.lang.Integer">
<generator class="increment" />
</id>
<property name="count" type="int" not-null="false" unique="false"/>
<many-to-one name="customer" column="fk_customer" class="Customer" not-null="false"/>
</hibernate-mapping>
Does anybody have a clue what is wrong?
|