betacentauri has asked for the wisdom of the Perl Monks concerning the following question:

Monks,

I know Class::DBI::AsXML emits inflated foreign key objects (those pointed to by has_a relationships in Class::DBI parlance).

However, when I tell Class::DBI::AsXML to give me $object->to_xml(depth=>somenumber), shouldn't I also expect it to visit every other record in the database related to $object as per has_many relationships, and give me their in-place XML representations?

Or, what am I doing wrong? All I get instead is <field>X</field> where X seems to be the number of foreign instances pointing to <field>...

Any help will be thankfully received.

  • Comment on Does Class::DBI::AsXML DWIM with has_many relationships?

Replies are listed 'Best First'.
Re: Does Class::DBI::AsXML DWIM with has_many relationships?
by NiJo (Friar) on Jan 28, 2006 at 16:09 UTC
    This smells like the array of has_many answers is treated as scalar somewhere.