title: hibernate avoid the id
body: <p>It's the first time I'm using hibernate, so forgive me if I'm going to ask for easy advice.<br/> I'm currently mapping a class using the xml (no annotations), I don't have the id on my table, but someone told me that I'm compeled to use an ID using hibernate, so, I created the SMS_MONITORING_ID field into the table and I'm mapping it as following:</p>
  
  <pre><code> &lt;class name="smsbox.dal.model.SmsMonitoring" table="MST_SMS_MONITORING"&gt;
      &lt;comment&gt;&lt;/comment&gt;
  
      &lt;id name="smsMonitoringId" type="long"&gt;
          &lt;column name="SMS_MONITORING_ID" /&gt;
          &lt;generator class="native" &gt;
              &lt;param name="sequence"&gt;ID_SMS_MONITORING&lt;/param&gt;
          &lt;/generator&gt;
  
      &lt;/id&gt;
  </code></pre>
  
  <p>I already made a sequence on my oracle database (ID_SMS_MONITORING), and I don't want that hibernate handle the id at all, I even would like to avoid any reference to the id in my java code (when I save the object).<br/>
  How could I accomplish my will to let hibernate ignoring the whole process in assigning the id ?</p>
  
  <p>P.S I'm mapping the id (long) into an Oracle "Number" type, what is the rule to avoid possible problem (long dosen't fit into number or vice-versa) can anybody provide me some link that explaing well the mapping types Hibernate and Oracle DB (I didn't find anything interesting on my own).<br/>
  Thanks</p>