Sequences in Oracle with Glorp

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Sequences in Oracle with Glorp

oystein
Hi

Im trying to use Sequences in Oracle with Glorp. The tables in the Oracle-database are already created, and the table of interest has a sequence. When im registering an object to the table via Glorp, I get the error message that "sequence does not exist". I have ensured that the instance variable which is bound to the sequence is set to nil. When using postgres, this was not a problem, but then again i created my postgres tables with Glorp. The message "session system platform areSequencesExplicitlyCreated" returns true for my Oracle session, which means that for Oracle the sequences must be handled manually (i think). How can i use the sequence in Oracle, which already exists?
Reply | Threaded
Open this post in threaded view
|

Re: Sequences in Oracle with Glorp

Henrik Sperre Johansen

On Jul 4, 2011, at 2:49 00PM, oystein wrote:

> Hi
>
> Im trying to use Sequences in Oracle with Glorp. The tables in the
> Oracle-database are already created, and the table of interest has a
> sequence. When im registering an object to the table via Glorp, I get the
> error message that "sequence does not exist". I have ensured that the
> instance variable which is bound to the sequence is set to nil. When using
> postgres, this was not a problem, but then again i created my postgres
> tables with Glorp. The message "session system platform
> areSequencesExplicitlyCreated" returns true for my Oracle session, which
> means that for Oracle the sequences must be handled manually (i think). How
> can i use the sequence in Oracle, which already exists?


Glorp wants your sequences to follow a naming scheme.
I think you'd have to reimplement DescriptorSystem>>#sequenceNameForField: in your descriptor system to align with the pre-existing sequence names.

Cheers,
Henry

(AFAICT, for auto-generated Oracle sequences in tables containing only one, that would be:

MyDescriptorSystemForPreexistingOracleDB >> #sequenceNameForField: aDatabaseField
^(aDatabaseField table sqlString),  '$seq')


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc