[Nitro] Og and legacy tables
Robert Mela
rob at robmela.com
Sun May 20 14:38:31 EDT 2007
I love Og because I can sketch out my ideas in the most intuitive way --
as objects, very concise ones at taht -- and the database tedium,
including table creation, join tables, etc., is taken care of for me.
But often it's necessary to work with pre-existing tables from another
application, and in those cases, ActiveRecord adapts pretty well -- you
can specify join table names ( e.g., :through ), override default table
names and unique id field names, etc.
I haven't seen anything in Og that looks like it creates classes based
on an existing table schema. Would anyone be interested in seeing Og
be able to wrap an existing table the way ActiveRecord can? It'd
involve adding attributes to override Og's default table naming, allow
arbitrary naming of the id field, and ways to specify join tables and
foreign key names of related objects.
It might also allow Nitro to leverage ActiveRecord::Migration for
managing database upgrades and rollbacks.
(Of course, it's possible these features are already possible with Og
and this is simply an exercise in public humility, but there's value in
that too...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rob.vcf
Type: text/x-vcard
Size: 116 bytes
Desc: not available
Url : http://rubyforge.org/pipermail/nitro-general/attachments/20070520/ff54f0a1/attachment-0001.vcf
More information about the Nitro-general
mailing list