[Nitro] The has_one/belongs_to relationship
Matthew B Gardner
weather at speakeasy.net
Mon Aug 20 20:21:48 EDT 2007
On Monday 20 August 2007 09:23, Matthew B Gardner wrote:
> > Thanks so much for the help -- I do have one more question, when you get
> > the time. I have a Node class that has_many comments (which belong_to a
> > Node) -- when I load the Node table, it loads the nodes and loads and
> > attaches the comments (which I still find really cool, btw) -- that's all
> > that's happening there, correct? What I mean is, the comments aren't also
> > loading their respective Nodes, as the Character was loading its Account,
> > are they? Just wanted to double check that I don't have a bunch of extra
> > Node instances running around.
> Just ran a test and it looks like they are running around (or maybe they're
> running around b/c the test included referencing comment->node). At any
> rate, it looks like relationships may not be a great idea for my project.
Just wanted to acknowledge that the comments were loading their respective
nodes when I referenced Comment#node -- so I'll just avoid doing that (I was
only doing it to test). This thread has definitely helped me understand
better how Og works with my objects -- thanks to both George and Jonathan for
the help and explanations.
More information about the Nitro-general