if you don't want to go this way, you can inject some model
manipulation in the ActiveRecordStarter.ModelsCreated event to tweak
ActiveRecordModel definition, this is called before initialization
completes

On Aug 5, 2:55 pm, Rhys Causey <[email protected]> wrote:
> Thanks, that sounds like a great solution!
>
> Rhys
>
> On 2010-08-05, at 5:53 PM, Ayende Rahien wrote:
>
>
>
> > Create your own dialect for Postgres that changes that behavior
>
> > On Thu, Aug 5, 2010 at 7:24 PM, rhys <[email protected]> wrote:
> > What's the best way to use different key generators for different
> > database engines? Our issue is that we require the "native" generator
> > in most cases, but with PostgreSQL, we need to use the "sequence"
> > generator, since the "native" generator in PostgreSQL creates IDs that
> > increment on the database level and not on a per-table basis (ie: it
> > uses a single sequence, and not a sequence per table). We can get
> > around this by changing the code if we need to use PostgreSQL, but
> > this is obviously not a great option. Is there a way to set the
> > generator when we're initializing ActiveRecord, instead of with
> > attributes in the Model class?
>
> > Thanks!
>
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "Castle Project Users" group.
> > To post to this group, send email to [email protected].
> > To unsubscribe from this group, send email to 
> > [email protected].
> > For more options, visit this group 
> > athttp://groups.google.com/group/castle-project-users?hl=en.
>
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "Castle Project Users" group.
> > To post to this group, send email to [email protected].
> > To unsubscribe from this group, send email to 
> > [email protected].
> > For more options, visit this group 
> > athttp://groups.google.com/group/castle-project-users?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Castle Project Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/castle-project-users?hl=en.

Reply via email to