Re: Oracle sequences for PK generation

"Guido Neitzer" <[email protected]> Sat, 5 Jul 2008 09:42:51 -0600
Newsgroups gmane.comp.web.webobjects.devel
Message-ID <[email protected]>
I'd look at the Wonder EROraclePlugIn (doesn't do much right now),
grab the newPrimaryKeys from the PostgresqlPlugIn and implement it for
Oracle - shouldn't be too hard. If you want correct SQL generation
from Entity Modeler, you'd also need to implement the stuff to create
and drop the sequences. As this is (as far as I know) pretty similar
to PostgreSQL, you could steal most of the code from there and only
"make it work".

cug


On Fri, Jul 4, 2008 at 1:47 PM, Markus Ruggiero <[email protected]> wrote:
> Hi,
>
> I am to create a (small) WO app that sits on top of an existing Oracle DB.
> One requirement I cannot change is that each table has an associated
> sequence for the primary key. So I cannot use EOF's automatic PK generation
> but I have to get the next value from the corresponding sequence. What
> options do I have? What have others done in such a situation, what are your
> experiences? How do you access the sequence? Model it as kind of an entity?
> Use raw SQL? Use the adaptor delegate to provide the PK? Simply trat te PK
> attribute like a "normal" attribute and assign a value to it?
>
> Thanks for any help
> ---markus---
>
> _______________________________________________
> WebObjects-dev mailing list
> [email protected]
> http://www.omnigroup.com/mailman/listinfo/webobjects-dev
>