[Nitro] [OG] enchant Question: klass.table or klass::OGTABLE

Judson Lester nyarly at gmail.com
Fri Nov 30 02:04:58 EST 2007


That's hilarious.  All I can say is: March was a long time ago.

On Nov 29, 2007 7:38 PM, Mark Van De Vyver <mvyver at gmail.com> wrote:

> On Nov 29, 2007 11:49 AM, Judson Lester <nyarly at gmail.com> wrote:
> > Looking back at that comment, I believe what I meant was that, rather
> than
> > use OGTABLE, and assign it based on the klass, instead, just use
> > klass.table(), and be sure that klass.table for SchemaInheritence works.
>  In
> > general, it was my thinking at the time that klass.table should be the
> > correct way to determine the table name, although in a perfect world,
> client
> > code wouldn't ever need to, except in unusual circumstances - like
> migrating
> > out of Og, or trying to understand the library better.
> >
> > Looking at the code now, later, I can't find Og::SchemaInheritenceBase
> at
> > all.  Has STI been abandoned?
>
> I just noticed this... :)
> http://www.nitroproject.org/uploads/posts/2007/3/refactor-field-maps.bndl
>
> [minor
> Judson Lester <nyarly at gmail.com>**20070320020302] {
> hunk ./og/lib/og/model.rb 499
> -      include Og::SchemaInheritanceBase
> +      include Og::Mixin::SingleTableInherited
> }
>
> [refactor: optimization of field_maps
>
>
> > Judson
> >
> >
> >
> > On Nov 7, 2007 12:00 AM, Mark Van De Vyver < mvyver at gmail.com> wrote:
> > >
> > >
> > >
> > > Hi Devs,
> > > This may be a dumb question, but which of the following is the correct
> > > way to access the table name of an Og managed class:
> > >  a) klass.table
> > >  b) klass::OGTABLE
> > >
> > > In fact just what does the following comment in
> > > sql.rb:SqlStore#enchant mean/relate to?
> > >
> > >      # FIXME: jl: Remove references to table, then remove these 5
> lines
> > >
> > > It makes me think the above choice it's been resolved to use
> > > klass::OGTABLE, _but_  _only_ in Og's code. Correct?
> > > So internal use of klass.table is deprecated but the table attribute
> > > remains for user code.  Correct?
> > >
> > > Mark
> > > _______________________________________________
> > > Nitro-general mailing list
> > > Nitro-general at rubyforge.org
> > > http://rubyforge.org/mailman/listinfo/nitro-general
> > >
> >
> >
> >
> > --
> > Your subnet is currently 169.254.0.0/16.  You are likely to be eaten by
> a
> > grue.
>



-- 
Your subnet is currently 169.254.0.0/16.  You are likely to be eaten by a
grue.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/nitro-general/attachments/20071129/1b733786/attachment.html 


More information about the Nitro-general mailing list