<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Sat, May 23, 2015 at 9:35 AM, Peter Rabbitson <span dir="ltr">&lt;<a href="mailto:rabbit+dbic@rabbit.us" target="_blank">rabbit+dbic@rabbit.us</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span class="">On 05/22/2015 09:57 PM, Lasse Makholm wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
It seems DBIx::Class::InflateColumn::DateTime does not update the<br>
inflated column value on: $row-&gt;update({ ts_column =&gt; undef })<br>
</blockquote>
<br></span>
That is a bug, not sure how it went overlooked for so long :( It is present as far back as 0.08112 (2009), likely earlier.<br></blockquote><div><br></div><div>Yeah, it seems remarkable that I&#39;m the first to stumble across this. On the other hand, I only found it because I was trying to get 100% condition coverage on something and was updating a row through all permutations of a couple of conditions.</div><div><br></div><div>I guess, generally, updating a timestamp column to null after it has had a value, is just not a very common thing to do.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Because of the nontrivial possibility of negative impact of changing something so fundamental, I have to think this through before going forward.<br></blockquote><div><br></div><div>Yeah, I don&#39;t really see a pretty way around this without risking a lot of random breakage. </div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">In the meantime an easy workaround for you is to add the following to a base result class (this is a hack, a real fix will materialize later):<br>
<br>
  sub store_column {<br>
    delete $_[0]-&gt;{_inflated_column}{$_[1]};<br>
    shift-&gt;next::method(@_);<br>
  }<br>
<br>
Sorry for not being able to offer anything better at the moment :(</blockquote><div><br></div><div>No worries. As far as workarounds/hacks go, this one is pretty decent. I&#39;ve seen and done a lot worse... :-) </div><div><br></div><div>Thanks for confirming this.</div><div><br></div><div>/L</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class=""><div class="h5"><br>
<br>
_______________________________________________<br>
List: <a href="http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class" target="_blank">http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class</a><br>
IRC: <a href="http://irc.perl.org#dbix-class" target="_blank">irc.perl.org#dbix-class</a><br>
SVN: <a href="http://dev.catalyst.perl.org/repos/bast/DBIx-Class/" target="_blank">http://dev.catalyst.perl.org/repos/bast/DBIx-Class/</a><br>
Searchable Archive: <a href="http://www.grokbase.com/group/dbix-class@lists.scsys.co.uk" target="_blank">http://www.grokbase.com/group/dbix-class@lists.scsys.co.uk</a><br>
</div></div></blockquote></div><br></div></div>