I have a table that has a unique key on (encrypt_ver_num, e_acct_num,
pay_type_id) and a primary key of (acct_id).
The following code:
#!/usr/bin/perl
use Bill::DB::Object::Acct;
use Data::Dumper;
my $acct = Bill::DB::Object::Acct->new( pay_type_id => 1, e_acct_num =>
'c8923a1e7de803ac73372d64dc11c75c1af2012d90fb6c8d', encrypt_ver_num => 0 );
my $s1=undef;
# This should return 0 from the documentation.
eval {
$s1 = $acct->load( speculative => 1 );
};
# Bug it doesn't
if ($@) {
print STDERR "ERROR: [EMAIL PROTECTED]";
}
print STDERR "S1=$s1\n";
Produces:
ERROR: No such Bill::DB::Object::Acct where encrypt_ver_num, e_acct_num,
pay_type_id = 0, c8923a1e7de803ac73372d64dc11c75c1af2012d90fb6c8d, 1 at
./acct2.pl line 12
S1=
So $acct->load( speculative => 1 ) is actually die-ing. My understanding is
that "speculative => 1" should force it to return 0. I'm running on the
latest SVN version of Rose::DB and Rose::DB::Object. Is this a bug, or am I
not understanding "speculative => 1" correctly?
-- Jeff Horn
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Rose-db-object mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rose-db-object