I figured it out.  You can still specify the generator params like you would
if you were using the sequence generator class. Something like this:

        <id
            name="userId"
            column="user_id"
            type="long"
            unsaved-value="0"
        >
            <generator class="native">
                <param name="sequence">user_id_sequence</param>
            </generator>
        </id>

And this is exactly what I needed.  This works really well with Xdoclet too.

Scott

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Scott A.
Resnik
Sent: Thursday, October 30, 2003 10:06 AM
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


-------------------------------------------------------
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