Ok I understand logic behind boolean context. As for SQL::Abstract <br>
doesn't seem like an issue, defer will return same result over and over, <br>
"lazy" 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>
"with_tag", "with_parent_tag". Eg. sub with_tag { return shift->search({ <br>
"tag.name" => "Something" }, { join => { "parent" => "tag" } }); }. If I <br>
remember correctly second call to with_parent_tag will add "tag_2" as <br>
table, but condition still refer to "tag". There should be a way to know <br>
which alias to use right now, "tag" or "tag_2", just like <br>
$me->current_source_alias for current table (is there one?).<br>
Additionally, if after two with_parent_tag() calls I add "tag" relation <br>
on main object like so: $rs = $rs->search({}, { join => "tag" }), all <br>
previous table aliases will shift, "tag" becomes "tag", "parent.tag" <br>
becomes "tag_2" (was "tag"), and "parent.tag" becomes "tag_3" (was <br>
"tag_2"). (It was some time ago, and I tested it with previous version, <br>
but it's probably same now). I guess they should be sticky.<br>
<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 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>