.find() not working with live preview? I have an Entry Type with a field called Gallery with a handle of gallery. Here are two examples of how I can access the Gallery field in a template:

{% set images = entry.gallery %}

{% set images = craft.assets({
    source:    'images',
    relatedTo: {sourceElement: entry.id, field: 'gallery'},
    order:     'sortOrder'
}) %}


The problem:

The first method works with Live Preview, the second does not. This wouldn't be an issue, but it's my understanding that we have to use the second method to eager load elements. So if I wanted to eager load a relationship on my gallery images, then Live Preview wouldn't work.

Is anyone else running into this issue? Is it a known bug or a misunderstanding of the implementation?

Thanks

Edit

To clarify via Brad's question, the following is the only thing in my template. This does NOT work with Live Preview:

{% set images = craft.assets({
    relatedTo: {sourceElement: entry.id, field: 'gallery'}
}) %}
{% for image in images %}
    {{ image.url }}&lt;br /&gt;
{% endfor %}


The entry variable is populated defining the Entry Template in the section settings.

Using the following WORKS with live preview:

{% set images = entry.gallery %}
{% for image in images %}
    {{ image.url }}&lt;br /&gt;
{% endfor %}
As noted in the comments above, eager-loading is not yet compatible with Live Preview. A clean workaround is to disable eager-loading in the template when the page is being viewed in Live Preview:

{% if craft.request.isLivePreview %}
    {% set images = entry.gallery %}
{% else %}
    {% set images = craft.assets({
        relatedTo: {sourceElement: entry.id, field: 'gallery'}
    }) %}
{% endif %}

{% for image in images %}
    {{ image.url }}&lt;br /&gt;
{% endfor %}