(Just a Try) Try removing the primary key and using the upper case e.g. :-
<document name="items">
<entity name="item" query="SELECT * FROM item as item where listingid=360245270">
<field column="LISTINGID" name="listingid" />
<entity name="detail" query="SELECT Body FROM detail where listingid='${item.LISTINGID}'">
<field column="Body" name="Body" />
</entity>
</entity>
</document>