<p><code>dump_object</code> dumps the hash returned by <code>get_columns</code>. If the result source includes virtual columns defined with <code>resultset_attributes</code>, they get dumped as well. Then populating from fixtures fails because the virtual columns don't exist in the table.</p>
<p>This change dumps only columns defined in <code>columns_info</code>, effectively excluding the virtual columns.</p>
<p>See t/lib/DBICTest/Schema3.pm for an example of a virtual column.</p>
<p>I'm not sure this in the best (or correct) way to exclude virtual columns, or even if defining virtual columns this way is correct. But this fixes an issue I encountered in an existing database and passes all other tests as well.</p>
<p>Two commits. The first is a failing test. The second is the fix.</p>
<hr>
<h4>You can view, comment on, or merge this pull request online at:</h4>
<p> <a href='https://github.com/dbsrgits/DBIx-Class-Fixtures/pull/14'>https://github.com/dbsrgits/DBIx-Class-Fixtures/pull/14</a></p>
<h4>Commit Summary</h4>
<ul>
<li>Add failing test</li>
<li>Ignore virtual columns in dump_object</li>
</ul>
<h4>File Changes</h4>
<ul>
<li>
<strong>M</strong>
<a href="https://github.com/dbsrgits/DBIx-Class-Fixtures/pull/14/files#diff-0">Changes</a>
(8)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/dbsrgits/DBIx-Class-Fixtures/pull/14/files#diff-1">dist.ini</a>
(1)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/dbsrgits/DBIx-Class-Fixtures/pull/14/files#diff-2">lib/DBIx/Class/Fixtures.pm</a>
(9)
</li>
<li>
<strong>A</strong>
<a href="https://github.com/dbsrgits/DBIx-Class-Fixtures/pull/14/files#diff-3">t/20-virtual-column.t</a>
(57)
</li>
<li>
<strong>A</strong>
<a href="https://github.com/dbsrgits/DBIx-Class-Fixtures/pull/14/files#diff-4">t/lib/DBICTest/Schema3.pm</a>
(71)
</li>
<li>
<strong>A</strong>
<a href="https://github.com/dbsrgits/DBIx-Class-Fixtures/pull/14/files#diff-5">t/var/configs/virtual-columns.json</a>
(6)
</li>
</ul>
<h4>Patch Links:</h4>
<ul>
<li><a href='https://github.com/dbsrgits/DBIx-Class-Fixtures/pull/14.patch'>https://github.com/dbsrgits/DBIx-Class-Fixtures/pull/14.patch</a></li>
<li><a href='https://github.com/dbsrgits/DBIx-Class-Fixtures/pull/14.diff'>https://github.com/dbsrgits/DBIx-Class-Fixtures/pull/14.diff</a></li>
</ul>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/dbsrgits/DBIx-Class-Fixtures/pull/14">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AASeAuyW_cdZYhK0K29ylqBhH2dQc_aMks5sicOIgaJpZM4PYV1j">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AASeAkv6FS6V008yt7fknRcHY_Z6LQ50ks5sicOIgaJpZM4PYV1j.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
<link itemprop="url" href="https://github.com/dbsrgits/DBIx-Class-Fixtures/pull/14"></link>
<meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>
<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/dbsrgits/DBIx-Class-Fixtures","title":"dbsrgits/DBIx-Class-Fixtures","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/dbsrgits/DBIx-Class-Fixtures"}},"updates":{"snippets":[{"icon":"DESCRIPTION","message":"Exclude virtual columns (#14)"}],"action":{"name":"View Pull Request","url":"https://github.com/dbsrgits/DBIx-Class-Fixtures/pull/14"}}}</script>