Re: [Dbix-class] exception_action fail after DBIC upgrade

2013-01-22 Thread Konstantin A. Pustovalov
Object which stringifies to empty string is definitely not the same as empty string (the former is true value while latter is not). Yes, except that it is a flawed assumption that folks check for "truthiness" of $@. In fact any code that does this (if ($@) { ... }) is arguably wrong. The only c

Re: [Dbix-class] exception_action fail after DBIC upgrade

2013-01-22 Thread Dave Howorth
Peter Rabbitson wrote: > Yes, except that it is a flawed assumption that folks check for > "truthiness" of $@. In fact any code that does this (if ($@) { ... }) is > arguably wrong. The only correct way to check for an exception is (if > ($@ eq '') { ... } ) after an eval just took place. So th

Re: [Dbix-class] exception_action fail after DBIC upgrade

2013-01-22 Thread Peter Rabbitson
On Tue, Jan 22, 2013 at 10:49:18AM +, Dave Howorth wrote: > Peter Rabbitson wrote: > > Yes, except that it is a flawed assumption that folks check for > > "truthiness" of $@. In fact any code that does this (if ($@) { ... }) is > > arguably wrong. The only correct way to check for an exceptio

Re: [Dbix-class] Re: Prefetch and join on different tables

2013-01-22 Thread Paula
I tried this, and in this case I get: [error] DBIx::Class::Row::get_column(): No such column 'h1' so in this case it is not executing prefetch 2013/1/21 Charlie Garrison > Good afternoon, > > On 21/01/13 at 5:39 PM -0300, Paula wrote: > > >2013/1/21 Dagfinn Ilmari Mannsåker > > > >> ->searc

Re: [Dbix-class] Re: Prefetch and join on different tables

2013-01-22 Thread Peter Rabbitson
On Tue, Jan 22, 2013 at 11:23:42AM -0300, Paula wrote: > I tried this, and in this case I get: > > [error] DBIx::Class::Row::get_column(): No such column 'h1' > > so in this case it is not executing prefetch You are missing something simple, yet non-obvious. Please supply the *entire* search()

[Dbix-class] DBIx::Class with ODBC

2013-01-22 Thread stephenmoy
Hi, Has anyone gotten DBIx::Class to work with an Ingres database using an ODBC driver? I get the following error on a simple search: DBIx::Class::ResultSet::search(): DBI Exception: DBD::ODBC::db get_info failed: [Ingres][Ingres ODBC Driver]Information type out of range (SQL-HY096) Class::DBI a

Re: [Dbix-class] DBIx::Class with ODBC

2013-01-22 Thread Peter Rabbitson
On Tue, Jan 22, 2013 at 09:21:51AM -0800, stephenmoy wrote: > Hi, > > Has anyone gotten DBIx::Class to work with an Ingres database using an ODBC > driver? > > I get the following error on a simple search: > DBIx::Class::ResultSet::search(): DBI Exception: DBD::ODBC::db get_info > failed: [Ingres

Re: [Dbix-class] Re: Prefetch and join on different tables

2013-01-22 Thread Paula
OK this is the code: (in previous emails I used different names for the tables to simplify them, here I am using the real names in my code: molcfp=mc,molstat=mt,moldata=mdata) $attr->{join}='molstat'; $attr->{prefetch}='molcfp'; @molstats=split(/;/,$molstat); foreach my $i (@molstats) { my @split

[Dbix-class] Re: DBIx::Class with ODBC

2013-01-22 Thread stephenmoy
> Please connect to the database using plain DBI and give us the > output of: > $dbh->get_info( >$DBI::Const::GetInfoType::GetInfoType{SQL_DBMS_NAME} > ); Output is INGRES -- View this message in context: http://dbix-class.35028.n2.nabble.com/DBIx-Class-with-ODBC-tp7577958p7577961.html Se

Re: [Dbix-class] Re: DBIx::Class with ODBC

2013-01-22 Thread Peter Rabbitson
On Tue, Jan 22, 2013 at 10:04:17AM -0800, stephenmoy wrote: > > Please connect to the database using plain DBI and give us the > > output of: > > > $dbh->get_info( > >$DBI::Const::GetInfoType::GetInfoType{SQL_DBMS_NAME} > > ); > > Output is INGRES > Grumble. The error before means that the

Re: [Dbix-class] Re: Prefetch and join on different tables

2013-01-22 Thread Peter Rabbitson
On Tue, Jan 22, 2013 at 02:46:40PM -0300, Paula wrote: > OK this is the code: (in previous emails I used different names for the > tables to simplify them, here I am using the real names in my code: > molcfp=mc,molstat=mt,moldata=mdata) > > > $attr->{join}='molstat'; > $attr->{prefetch}='molcfp';

Re: [Dbix-class] Re: Prefetch and join on different tables

2013-01-22 Thread Paula
Thank you for yours answer. I realized that I made a mistake in defining the relationships between tables. Because one each row in moldata corresponds to one row in molcfp and one in molstat (in fact they could be the same table). How does this affect the way of retrieving the resultset? 2013/1/2