I'm using generator class "sequence", not native... Here's an example
mapping file:

<hibernate-mapping>
  <class name="kkdb.hnate.tbl_1" table="tbl_1">
    <id name="serno" column="serno" type="java.lang.Long">
      <generator class="sequence">
        <param name="sequence">seq_1</param>
      </generator>
    </id>
    <property name="name" type="string"/>
    <property name="surname" type="string"/>
  </class>
</hibernate-mapping>

Regards.

Serkan.

-----Original Message-----
From: Scott A. Resnik [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 30, 2003 6:06 PM
To: [EMAIL PROTECTED]
Subject: [Hibernate] Native id's and oracle

Hello:

I've search the forums, and the manual, and they say the same thing.  That
the native strategy is smart enough to use Oracle Sequences when necessary.
What I want to know is how do I tell hibernate what sequence name to use
when it's using an Oracle Database.  

I need to run on both MySQL and Oracle and I would like to avoid changing
the source and from what I've read the native id is the way to go.

Thanks,

Scott


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
hibernate-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-devel


Bu mesaj ve onunla iletilen tüm ekler gönderildigi kisi ya da kuruma özel ve Bankalar 
Kanunu geregince, gizlilik yükümlülügü tasiyor olabilir. Bu mesaj, hiçbir sekilde, 
herhangi bir amaç için çogaltilamaz, yayinlanamaz ve para karsiligi satilamaz; mesajin 
yetkili alicisi veya alicisina iletmekten sorumlu kisi degilseniz, mesaj içerigini ya 
da eklerini kopyalamayiniz, yayinlamayiniz, baska kisilere yönlendirmeyiniz ve mesaji 
gönderen kisiyi derhal uyararak bu mesaji siliniz. Bu mesajin içeriginde ya da 
eklerinde yer alan bilgilerin dogrulugu, bütünlügü ve güncelligi Bankamiz tarafindan 
garanti edilmemektedir ve bilinen virüslere karsi kontrolleri yapilmis olarak yollanan 
mesajin sisteminizde yaratabilecegi zararlardan Bankamiz sorumlu tutulamaz.

This message and the files attached to it are under the privacy liability in 
accordance with the Banking Law and confidential to the use of the individual or 
entity to whom they are addressed. This message cannot be copied, disclosed or sold 
monetary consideration for any purpose. If you are not the intended recipient of this 
message, you should not copy, distribute, disclose or forward the information that 
exists in the content and in the attachments of this message; please notify the sender 
immediately and delete all copies of this message. Our Bank does not warrant the 
accuracy, integrity and currency of the information transmitted with this message. 
This message has been detected for all known computer viruses thence our Bank is not 
liable for the occurrence of any system corruption caused by this message.


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
hibernate-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-devel

Reply via email to