Author Topic

John Dalton

Saturday 27 March 2004 6:15:59 pm

Comment40222

I'm having a similar problem - I need to be able to access related objects of items I've fetched.

How do I either access those objects directly from the value returned by fetch, or get the object id so that I can grab it some other way?

I have several related objects, one of them is called "band". Let's say I want to grab the attribute "description" from the band object which is related to the current item - in the loop I've tried:

$item.band.description
$item.object.band.description
$item.object.data_map.band.description
$item.object.data_map.band.data_map.description
$item.object.data_map.band.object.data_map.description

$item.object.data_map.band gives me formatted output, but not access to attributes.

This must be simple, but I can't find an example in the documentation.