[Nitro] Nitro/OG examples that show recommended ......

George Moschovitis george.moschovitis at gmail.com
Fri Sep 2 11:30:48 EDT 2005

> The above is fine for querying objects, but it does not work when updating objects.
> For instance, I have a legacy schema the has invoice headers in an invoice table and invoice line items in a transact table.

I see, this is not available for the moment but you are right, this is
an important feature.
To tell you the truth, at the moment I am mostly working on Nitro
stuff (and some internal nitro based projects) as I am waiting to see
some progress on Deb's extensive Og patch. But I 'll manage to find
some time to work on this before the next release. If one of the more
experienced Og users can provide a patch, even better ;-)

> I guess I am missing the syntax of how to map the 5 db fields to the fields for the sub-object.  If this will stored in a different table, then I could use has_one or has_many to that, but how is it done within the same table.  I am sure I am just missing a simple piece, I just can't seem to find it.

Ah, now I understand your problem. How about this:

module Address
   property :line1, String, :sql => 'CHAR(30)'
   property :line2, ...

class Customer
 include Address
 property :name, String
 property :seq_no, Integer
 property :other_fields, String
 property :more_fields, String

and then:


Does this work for you?

> I do appreciate your time to answer my questions, it really has been very helpful to me.

No prob,



More information about the Nitro-general mailing list