Ok I understand logic behind boolean context. As for SQL::Abstract <br>
doesn&#39;t seem like an issue, defer will return same result over and over, <br>
&quot;lazy&quot; can be used too.<br>
Main goal was to solve issues with joins. I use chained resultsets a <br>
lot, and they often go into ResultSet classes as helpers like <br>
&quot;with_tag&quot;, &quot;with_parent_tag&quot;. Eg. sub with_tag { return shift-&gt;search({ <br>
&quot;tag.name&quot; =&gt; &quot;Something&quot; }, { join =&gt; { &quot;parent&quot; =&gt; &quot;tag&quot; } }); }. If I <br>
remember correctly second call to with_parent_tag will add &quot;tag_2&quot; as <br>
table, but condition still refer to &quot;tag&quot;. There should be a way to know <br>
which alias to use right now, &quot;tag&quot; or &quot;tag_2&quot;, just like <br>
$me-&gt;current_source_alias for current table (is there one?).<br>
Additionally, if after two with_parent_tag() calls I add &quot;tag&quot; relation <br>
on main object like so: $rs = $rs-&gt;search({}, { join =&gt; &quot;tag&quot; }), all <br>
previous table aliases will shift, &quot;tag&quot; becomes &quot;tag&quot;, &quot;parent.tag&quot; <br>
becomes &quot;tag_2&quot; (was &quot;tag&quot;), and &quot;parent.tag&quot; becomes &quot;tag_3&quot; (was <br>
&quot;tag_2&quot;). (It was some time ago, and I tested it with previous version, <br>
but it&#39;s probably same now). I guess they should be sticky.<br>


<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly or <a href="https://github.com/dbsrgits/dbix-class/pull/98#issuecomment-204437312">view it on GitHub</a><img alt="" height="1" src="https://github.com/notifications/beacon/AASeAtc3Oid3LpcPaX2rvM3u0_7U6EIMks5pzTjugaJpZM4H7fjh.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/pull/98#issuecomment-204437312"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>