<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
        {mso-style-priority:99;
        mso-style-link:"Plain Text Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
code
        {mso-style-priority:99;
        font-family:"Courier New";}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:"Courier New";
        mso-fareast-language:EN-GB;}
span.PlainTextChar
        {mso-style-name:"Plain Text Char";
        mso-style-priority:99;
        mso-style-link:"Plain Text";
        font-family:"Calibri","sans-serif";}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-GB link=blue vlink=purple><div class=WordSection1><p class=MsoNormal>Hi<o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>When I call create on a result set like the same in the catalyst documentation &nbsp;like <o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p style='mso-margin-top-alt:12.0pt;margin-right:0cm;margin-bottom:12.0pt;margin-left:0cm'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <b><span style='font-size:10.0pt;font-family:"Courier New";color:#333333'>my $book = $c-&gt;model('DB::Book')-&gt;create({</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:#333333'>title&nbsp; =&gt; $title, rating =&gt; $rating });</span><o:p></o:p></p><p class=MsoNormal> I get the following error <o:p></o:p></p><p class=MsoNormal><code><span lang=EN style='font-size:10.0pt;color:#333333'><o:p>&nbsp;</o:p></span></code></p><p class=MsoNormal style='mso-margin-top-alt:12.0pt;margin-right:10.5pt;margin-bottom:12.0pt;margin-left:10.5pt;background:#CCCCEE'><span lang=EN style='font-size:10.0pt;font-family:"Courier New";color:#333333;mso-fareast-language:EN-GB'>DBIx::Class::ResultSet::create(): Unable to perform storage-dependent operations with a detached result source (source '_unnamed_' is not associated with a schema). at /home/gordon/catalyst/test/script/../lib/test/Controller/Books.pm line 56<o:p></o:p></span></p><p class=MsoNormal><code><span lang=EN style='color:#333333'><o:p>&nbsp;</o:p></span></code></p><p class=MsoNormal><code><span lang=EN style='font-family:"Calibri","sans-serif";color:#333333'>I am using the most up to date version of catalyst, DBIx::Class.&nbsp; I am also using it with a MySQL backend.<o:p></o:p></span></code></p><p class=MsoNormal><code><span lang=EN style='font-family:"Calibri","sans-serif";color:#333333'><o:p>&nbsp;</o:p></span></code></p><p class=MsoNormal><code><span lang=EN style='font-family:"Calibri","sans-serif";color:#333333'>Is there a setting I need to set so this error messages goes away and insert records into the database?&nbsp; Has anyone had similar issues<o:p></o:p></span></code></p><p class=MsoNormal><code><span lang=EN style='font-family:"Calibri","sans-serif";color:#333333'><o:p>&nbsp;</o:p></span></code></p><p class=MsoNormal><code><span lang=EN style='font-family:"Calibri","sans-serif";color:#333333'><o:p>&nbsp;</o:p></span></code></p><p class=MsoNormal><code><span lang=EN style='font-family:"Calibri","sans-serif";color:#333333'>I raised this issue with the DBIx::Class mailing list and they said:<o:p></o:p></span></code></p><p class=MsoNormal><code><span lang=EN style='font-family:"Calibri","sans-serif";color:#333333'><o:p>&nbsp;</o:p></span></code></p><p class=MsoPlainText style='text-indent:36.0pt'>The fix is to insert this line before you serialize the object:<o:p></o:p></p><p class=MsoPlainText><o:p>&nbsp;</o:p></p><p class=MsoPlainText style='text-indent:36.0pt'># to let DBIC automatically pick up the correct schema in the child # process after Storable freezed/thawed the result objects local <o:p></o:p></p><p class=MsoPlainText style='text-indent:36.0pt'><o:p>&nbsp;</o:p></p><p class=MsoPlainText style='margin-left:36.0pt;text-indent:36.0pt'>$DBIx::Class::ResultSourceHandle::thaw_schema = $rs-&gt;result_source-&gt;schema;<o:p></o:p></p><p class=MsoNormal><code><span lang=EN style='font-family:"Calibri","sans-serif";color:#333333'><o:p>&nbsp;</o:p></span></code></p><p class=MsoNormal><code><span lang=EN style='font-family:"Calibri","sans-serif";color:#333333'>I am unsure where to put this in my application.&nbsp; Has anyone have ideas how to resolve this <o:p></o:p></span></code></p><p class=MsoNormal><code><span lang=EN style='font-family:"Calibri","sans-serif";color:#333333'><o:p>&nbsp;</o:p></span></code></p><p class=MsoNormal><code><span lang=EN style='font-family:"Calibri","sans-serif";color:#333333'>Regards <o:p></o:p></span></code></p><p class=MsoNormal><code><span lang=EN style='font-family:"Calibri","sans-serif";color:#333333'><o:p>&nbsp;</o:p></span></code></p><p class=MsoNormal><code><span lang=EN style='font-family:"Calibri","sans-serif";color:#333333'>Gordon </span></code><o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p></div></body></html>