-----Original Message-----
From: Ned Wolpert [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, December 20, 2001 8:51 PM
To: [EMAIL PROTECTED]
Subject: Re: [castor-dev] Patch for SequenceKeyGenerator (was Sequence
keygen and PostgreSQL)]

Folks-

  I update the class SequenceKeyGenerator to allow the inclusion of the
column name in the sequence used by Castor.  This patch was generated by

Daniel Serodio, and I tested it on my end.  Let me know if this causes 
problems.  It is not used by default, rather you have to specify it,
like 
this:
        <key-generator name="SEQUENCE">
           <param name="sequence" value="{0}_{1}_seq"/>
        </key-generator>

I'll update the cvs docs to include this functionality if no problems
are
detected. (Note that this can be used for any database, but its more 
useful for PostgreSQL due to its default behavior)

Thanks.

> From: Daniel Serodio <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: [castor-dev] Patch for SequenceKeyGenerator (was Sequence
> keygen and PostgreSQL)
> Date: 11 Dec 2001 18:49:41 -0200
> 
>       Here I am, replying to myself... Well, did a little research on 
> the
> subject, and `[tablename]_[columnname]_sec' really is the default
> sequence name for SERIAL columns on PostgreSQL. Quoting from the
> PostgreSQL Users Guide:

....
 
> >     I modified SequenceKeyGenerator.java (in
> org.exolab.castor.jdo.drivers), and now `{1}' expands to the columns'
> name. If you don't use `{1}' in your sequence, you won't notice any
> changes, so I'm pretty positive I didn't break anything.
> 
>       Attached is the patch against Castor 0.9.3, please comment on
it. 
> I'm using the patched Castor right now, I'll report anything strange.



=====
Virtually,        |                   "Must you shout too?" 
Ned Wolpert       |                                  -Dante
[EMAIL PROTECTED] |             
_________________/              "Who watches the watchmen?"
4e75                                       -Juvenal, 120 AD

-- Place your commercial here --                      fnord

__________________________________________________
Do You Yahoo!?
Check out Yahoo! Shopping and Yahoo! Auctions for all of
your unique holiday gifts! Buy at http://shopping.yahoo.com
or bid at http://auctions.yahoo.com

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to