Hi all,
I'm creating a ResultSet by calling
$this->view->all_locations = \Model\Location::find(['order'=>'name asc']);
In my Volt file, I'm iterating through that resultset with this code
<select class = "selectpicker col-xl-8 col-md-6 col-xs-12 m-b" multiple id = "location-picker">
{% for Location in all_locations %}
{% if !Location.hidden %}
<option value = "{{ Location.id }}" {% if viewing_locations is not NULL AND (Location.id in viewing_locations) %}selected{% endif %}>{{ Location.name }}</option>
{% endif %}
{% endfor %}
</select>
This code is causing a second identical query to be executed - and I have no idea why.