title: GenericADOException: could not insert
body: <p>I'm trying to save my order object in the database that has a relationship many-to-one with the table pastaIndividual.</p>
  
  <p>But, I'm getting this exception:</p>
  
  <blockquote>
    <p>Error: NHibernate.Exceptions.GenericADOException: could not insert:
    [FrancosPoS.DBMapping.order][SQL: INSERT INTO order (price, cash,
    credit, obs) VALUES (?, ?, ?, ?);SELECT LAST_INSERT_ID()] --->
    MySql.Data.MySqlClient.MySqlException: 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 'order (price, cash, credit, obs)
    VALUES ('123', 1, 0, 'Nhibernate');SELECT LAST_' at line 1</p>
  </blockquote>
  
  <p>Here is my order mapping table:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;hibernate-mapping assembly="FrancosPoS" namespace="FrancosPoS.DBMapping" xmlns="urn:nhibernate-mapping-2.2"&gt;
    &lt;class name="order" table="order" lazy="true" &gt;
      &lt;id name="idOrder"&gt;
        &lt;generator class="identity" /&gt;
      &lt;/id&gt;
      &lt;set name="pastaIndividual" table="pasta_individual" cascade="save-update"&gt;
        &lt;key column="idPastaI"/&gt;
        &lt;one-to-many class="pastaIndividual"/&gt;
      &lt;/set&gt;
      &lt;!--&lt;many-to-one insert="false" update="false" lazy="false" name="pastaIndividual" class="FrancosPoS.DBMapping.pastaIndividual"&gt;
        &lt;column name="idPastaI" sql-type="int(11)" not-null="false" /&gt;
      &lt;/many-to-one&gt;--&gt;
      &lt;many-to-one insert="false" update="false" lazy="false" name="pastaCombo" class="FrancosPoS.DBMapping.pastaCombo"&gt;
        &lt;column name="idPastaC" sql-type="int(11)" not-null="false" /&gt;
      &lt;/many-to-one&gt;
      &lt;many-to-one insert="false" update="false" lazy="false" name="pastaFeast" class="FrancosPoS.DBMapping.pastaFeast"&gt;
        &lt;column name="idPastaF" sql-type="int(11)" not-null="false" /&gt;
      &lt;/many-to-one&gt;
      &lt;many-to-one insert="false" update="false" lazy="false" name="salad" class="FrancosPoS.DBMapping.salad"&gt;
        &lt;column name="idSalad" sql-type="int(11)" not-null="false" /&gt;
      &lt;/many-to-one&gt;
      &lt;many-to-one insert="false" update="false" lazy="false" name="drink" class="FrancosPoS.DBMapping.drink"&gt;
        &lt;column name="idDrink" sql-type="int(11)" not-null="false" /&gt;
      &lt;/many-to-one&gt;
      &lt;property name="price"&gt;
        &lt;column name="price" sql-type="decimal(8,4)" not-null="true" /&gt;
      &lt;/property&gt;
      &lt;property name="cash"&gt;
        &lt;column name="cash" sql-type="tinyint(1)" not-null="false" /&gt;
      &lt;/property&gt;
      &lt;property name="credit"&gt;
        &lt;column name="credit" sql-type="tinyint(1)" not-null="false" /&gt;
      &lt;/property&gt;
      &lt;property name="obs"&gt;
        &lt;column name="obs" sql-type="varchar(150)" not-null="false" /&gt;
      &lt;/property&gt;
    &lt;/class&gt;
  &lt;/hibernate-mapping&gt;
  </code></pre>
  
  <p>Here is my pastaIndividual mapping:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;hibernate-mapping assembly="FrancosPoS" namespace="FrancosPoS.DBMapping" xmlns="urn:nhibernate-mapping-2.2"&gt;
    &lt;class name="pastaIndividual" table="pasta_individual" lazy="true" &gt;
      &lt;id name="idPastaI"&gt;
        &lt;generator class="identity" /&gt;
      &lt;/id&gt;
      &lt;property name="type"&gt;
        &lt;column name="type" sql-type="varchar(25)" not-null="true" /&gt;
      &lt;/property&gt;
      &lt;property name="price"&gt;
        &lt;column name="price" sql-type="decimal(8,4)" not-null="true" /&gt;
      &lt;/property&gt;
    &lt;/class&gt;
  &lt;/hibernate-mapping&gt;
  </code></pre>
  
  <p>I've tried on order mapping to use the <code>&lt;set&gt;</code> or just <code>&lt;many-to-one&gt;</code>, but the same error happen.</p>
  
  <p>Maybe am I missing some inverse property?</p>
  
  <p>Thanks.</p>