[CDBI] question about set_sql and iterators

arnim.rupp at lhsystems.com arnim.rupp at lhsystems.com
Thu Nov 19 12:45:50 GMT 2009

> 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 


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

More information about the ClassDBI mailing list