I found something weird: This SQL is generated according to reverse_related_objects fetch:
SELECT DISTINCT
ezcontentobject.*
FROM
ezcontentobject, ezcontentobject_link
WHERE
ezcontentobject.id=ezcontentobject_link.from_contentobject_id
AND
ezcontentobject.status=1
AND
ezcontentobject_link.to_contentobject_id=285
AND
ezcontentobject_link.from_contentobject_version=ezcontentobject.current_version
AND
contentclassattribute_id=0
What is the reason of last two lines? Without it, SQL returns correct data.
no, a "contains" relationship is not a "relation" relationship. think about the first as folder/file , and the second as "link from A to B".
in admin view, contianed entities are shown indented with respect to their container, as a hiaerarchical tree. Related objects are shown under the detail of the object (lower-center part of the page).
at any rate, try to add a
{$object|attribute(show, X)}
with X = depth of inspection (1 ..... infinite) within your loop and see what exactly object contains.