Re: [CDBI] question about set_sql and iterators

<arnim.rupp-5Wlsihp/[email protected]> Thu, 19 Nov 2009 13:45:50 +0100
Newsgroups gmane.comp.lang.perl.modules.class-dbi
Message-ID <BEC069CD86F9AC42A3ADB4AF737C92A3165C57@SW-FRAADS-MBX08.ads.dlh.de>
> I don't think you've really understood how object-relational mappers
> work.

i would say it's more a question if there can be just one database-table
in one class. as soon as I use set_sql to select from 2+ tables that's
not the case anyway.

> There are other work-arounds. You might be able to get by by adding
> TEMP columns to A. 

that worked (for "b_number" being a column name in table b):

A->columns(TEMP => qw/b_number/ );

while (my $record = $obj->next) {
	print $record->id; # works
	print $record->b_number; # works 
}


thanks!

 
Sitz der Gesellschaft / Corporate Headquarters: Lufthansa Systems Infratec GmbH, Kelsterbach, Registereintragung / Registration: Amtsgericht Darmstadt 83851
Vorsitzender des Aufsichtsrats / Chairman of the Supervisory Board: Dr. Gunter Kuechler
Geschaeftsfuehrung / Management Board: Dr. Hannes Pfister