[Dbix-class] DBIx::Class - Create

Ben Tilly btilly at gmail.com
Mon Jul 18 16:01:46 GMT 2011


Looking at the source code for the module, there is a check for
freeze/thaw causing the problem that should get an explicit error
message telling you how to fix it.  If there is no such message, then
it is likely that something else went wrong.  (Or you have an old
version of the module.)

On Mon, Jul 18, 2011 at 8:47 AM, Alexander Hartmaier
<alexander.hartmaier at t-systems.at> wrote:
> I had the same message last week.
> It happens when your Result(Set) object loses its schema.
> That might happen because of freeze/thaw, in my case because of
> Parallel::Iterator which does use Storable internally.
>
> The fix is to insert this line before you serialize the object:
>
> # to let DBIC automatically pick up the correct schema in the child
> # process after Storable freezed/thawed the result objects
> local $DBIx::Class::ResultSourceHandle::thaw_schema =
> $rs->result_source->schema;
>
> Am 2011-07-18 17:35, schrieb Ben Tilly:
>>
>> Could you show the code that fails?
>>
>> I don't know DBIx::Class that well, but my gut feeling is that you
>> failed to do something basic like call
>> $schema->connect(@connect_info).
>>
>> My usual way of debugging this sort of problem is to start with the
>> example code from the documentation.  Get that to work exactly.  Then
>> start trying to step by step modify it to the code that is broken.  At
>> some change it will break.  And when it does, I'll learn what I am
>> doing wrong.
>>
>> On Mon, Jul 18, 2011 at 4:12 AM, Gordon Stewart
>> <gordon at gordonstewart.co.uk>  wrote:
>>>
>>> Hi
>>>
>>>
>>>
>>> When I call create on a result set I get the following error
>>>
>>>
>>>
>>> Unable to perform storage-dependent operations with a detached result
>>> source
>>> (source '_unnamed_' is not associated with a schema).
>>>
>>>
>>>
>>> I am using the most up to date version of DBIx::Class.  I am also using
>>> it
>>> with a MySQL backend.
>>>
>>>
>>>
>>> Is there a setting I need to set so this error messages goes away and
>>> insert
>>> records into the database.
>>>
>>>
>>>
>>> Regards
>>>
>>>
>>>
>>> Gordon
>>>
>>> _______________________________________________
>>> 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
>>>
>> _______________________________________________
>> 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
>
> *"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
> T-Systems Austria GesmbH   Rennweg 97-99, 1030 Wien
> Handelsgericht Wien, FN 79340b
> *"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
> Notice: This e-mail contains information that is confidential and may be
> privileged.
> If you are not the intended recipient, please notify the sender and then
> delete this e-mail immediately.
> *"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
>
> _______________________________________________
> 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
>



More information about the DBIx-Class mailing list