<p>Class::DBI allows the foreign_class to be a non database class. e.g DateTime.</p>

<p>Inflation and deflation can be controlled either by supplying:</p>

<p><strong>PACKAGE</strong>-&gt;has_a(accessor =&gt; 'Foreign::Class', inflate =&gt; sub {}, deflate =&gt; sub {});</p>

<p>however if inflate isn't supplied then CDBI will call: Foreign::Class-&gt;new($val) and if deflate is not supplied it will stringify "$val".</p>

<p>This behaviour is mostly used for inflation and deflation of datetime columns and should be emulated</p>

<hr>

<h4>You can merge this Pull Request by running</h4>
<pre>  git pull https://github.com/ungrim97/dbix-class feature/cdbi_implicit_inflate</pre>
<p>Or view, comment on, or merge it at:</p>
<p>&nbsp;&nbsp;<a href='https://github.com/dbsrgits/dbix-class/pull/51'>https://github.com/dbsrgits/dbix-class/pull/51</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>Added test for implicit inflation/deflation of CDBI has_a</li>
  <li>Added handling for Implicit inflate/deflate of CDBI has_a relationships</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/dbsrgits/dbix-class/pull/51/files#diff-0">lib/DBIx/Class/CDBICompat/Relationships.pm</a>
    (67)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/dbsrgits/dbix-class/pull/51/files#diff-1">t/cdbi/70_implicit_inflate.t</a>
    (33)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/dbsrgits/dbix-class/pull/51/files#diff-2">t/cdbi/Date.pm</a>
    (42)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/dbsrgits/dbix-class/pull/51.patch'>https://github.com/dbsrgits/dbix-class/pull/51.patch</a></li>
  <li><a href='https://github.com/dbsrgits/dbix-class/pull/51.diff'>https://github.com/dbsrgits/dbix-class/pull/51.diff</a></li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<br>Reply to this email directly or <a href="https://github.com/dbsrgits/dbix-class/pull/51">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/302594__eyJzY29wZSI6Ik5ld3NpZXM6QmVhY29uIiwiZXhwaXJlcyI6MTcyMTMxMjgyNSwiZGF0YSI6eyJpZCI6MzczNzU1Nzd9fQ==--feb2c8be0353a8a582e078ab0901d9e09c426fba.gif" width="1" /></p>