[Dbix-class] create_related is failing on second time through loop?

Tim Anderson tja824 at gmail.com
Tue Jun 19 21:13:11 GMT 2012


Assuming that I set it correctly (see my DB.pm below), RaiseError had no
effect.

package Portal::Model::DB;

use strict;
use base 'Catalyst::Model::DBIC::Schema';

__PACKAGE__->config(
    schema_class =3D> 'Portal::Schema',

    connect_info =3D> {
        dsn =3D> 'dbi:Sybase:server=3Dxxxxx;database=3Dxxxxxx',
        user =3D> 'xxxxx',
        password =3D> 'xxxxx',
        on_connect_call =3D> 'datetime_setup',
        AutoCommit =3D> 1,
        RaiseError =3D> 1,
    }
);


I'm suspect the call isn't getting to DBI, but I don't know how to
prove/test it.

Thank you very much for you suggestion, though.

-Tim


On Tue, Jun 19, 2012 at 3:56 PM, Tim Anderson <tja824 at gmail.com> wrote:

> I don't have it set, but I will definitely give that a try.  Thanks for
> the suggestion.
>
> -Tim
>
>
> On Tue, Jun 19, 2012 at 3:49 PM, Len Jaffe <lenjaffe at jaffesystems.com>wro=
te:
>
>>
>>
>> On Tue, Jun 19, 2012 at 3:13 PM, Tim Anderson <tja824 at gmail.com> wrote:
>>
>>> Thanks Len.
>>>
>>> I noticed that too, but I assumed that since the first iteration through
>>> the loop was successful, this must be how the data is represented
>>> internally in the DBIx modules and I discounted it as a problem.  $new_=
role
>>> is definitely a scalar when I assign it to the hash ref and pass it to
>>> create_related.
>>>
>>
>> Do you have PrintError or RaiseError set in your options hash when you
>> connect to the DB?
>> If not, you might try setting PrintError, Heck. for debugging, set
>> RaiseError. Maybe you'll get a decent DBI error message. Because it appe=
ars
>> the DBI can't figure out what the problem is, it just know that there is
>> one.
>>
>> L.
>>
>> --
>> lenjaffe at jaffesystems.com   614-404-4214
>> www.volunteerable.net
>> Proprietor: http://www.theycomewithcheese.com/ - An Homage to Fromage
>> Greenbar <http://www.greenbartraining.org/>: Grubmaster: 2012-2009, Grub
>> Asst: 2008, Trained: 2007.
>>
>>
>>
>> _______________________________________________
>> List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
>> IRC: irc.perl.org#dbix-class
>> SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
>> Searchable Archive:
>> http://www.grokbase.com/group/dbix-class@lists.scsys.co.uk
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20120619/221=
d2ccc/attachment.htm


More information about the DBIx-Class mailing list