I'm trying to show the first image of an imagealbum in a list. But when creating a query i cannot access the $album->getImageuri() method in the foreach loop.
$albums = \ApAlbumQuery::create()
->join('ApAlbum.ApAlbumImage', \Propel\Runtime\ActiveQuery\Criteria::LEFT_JOIN)
->join('ApAlbumImage.ApImage', \Propel\Runtime\ActiveQuery\Criteria::LEFT_JOIN)
->where('ApAlbum.visibility is not null')
->groupBy('ApAlbum.Id')
->orderByStartdate("ASC")
->find();
foreach($albums as $album)
{
echo $album->getImageuri(); // not working?
}
When running the sql-query created with the Propel ->toString() method everything is present.
Anybody know what i'm doing wrong?