[Nitro] Og problem...

George Moschovitis george.moschovitis at gmail.com
Wed Oct 12 02:19:20 EDT 2005


We are working with Trans to fix issues like this. This is why 0.24.0
is delayed so much.
Stay patient for some more days please.

-g.


On 10/12/05, John Lloyd-Jones <john.lloydjones at gmail.com> wrote:
> Emmanuel
> I have reported similar issues some time back. I created an an object graph
> (that's what OG stands for, right) and discovered that OG does not handle
> inheritance well. My case involved a Party that 'has_many' Address. From
> Party, I derived a Person, and from Person a PersonalCustomer, expecting the
> latter to handle the Addresses. In the end, with help from Aleksi, I put in
> by hand some missing methods to get the appropriate oids and got it to work.
> But it was a hack -- and Aleksi suggested it only as an ugly hack. Since
> then, I have been hoping for a fix, but so far it still seems to be a
> problem. If George and his devs can get this fixed, it will move Nitro/Og
> into a league apart. Rails is OK for relatively simple object models, but
> just doesn't cut it for most of the applications I deal with. Og has all the
> promise, but alas, still doesn't deliver.
> John
>
>
> On 10/6/05, Emmanuel Piperakis <epiperak at softlab.ece.ntua.gr> wrote:
> > Hi everyone,
> >
> > I have discovered a problem with inheritance in Og. (I am not sure if it
> > is a problem or not).
> >
> > class Report
> >    property :a, String
> >    has_many :lines
> > end
> >
> > class Subreport < Report
> >    property :b, String
> > end
> >
> > class Line
> >    property :c, String
> >    belongs_to :report
> > end
> >
> > The problem is that I would expect:
> > 1) Subreport to inherit the has_many, from Report, therefore report.lines
> > would exist (which it does not)
> > 2) Line has a report_oid (as expected) and line.report returns the report.
> > I would have a way to find the subreport from line directly. I know it
> > does not sound easy, but is there a way? (at the moment I have to find the
> > Subreport I am interested in and the query all the Lines with report_oid =
> > to the subreports' oid. This solution is not so elegant, and actually not
> > correct: eg in the case where I have Subreport_a and Subreport_b, then the
> > line.report_oid would end up having same oids and a simple query like I
> > mentioned before will not work). What I suggets is that Og could create
> > line.subreport_a_oid and line.subreport_b_oid automatically for all the
> > subclasses of report. How does that sound?
> >
> > Thanx :-)
> >
> > Emmanouil Piperakis (epiperak at cs.ntua.gr)
> > {To explore is Human, to Create is Devine,
> >   To teach is Primal, to Rule is Sin}
> > _______________________________________________
> > Nitro-general mailing list
> > Nitro-general at rubyforge.org
> > http://rubyforge.org/mailman/listinfo/nitro-general
> >
>
>
> _______________________________________________
> Nitro-general mailing list
> Nitro-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/nitro-general
>
>
>


--
http://www.gmosx.com
http://www.navel.gr
http://www.nitrohq.com




More information about the Nitro-general mailing list