Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

SS3 - Leftjoin


Reply


2 Posts   362 Views

Avatar
fyrebase

Community Member, 7 Posts

21 October 2012 at 6:43pm

Edited: 21/10/2012 6:49pm

There is probably a simple answer to this, but I'm not having much luck doing a left join with the following code.

http://www.sspaste.com/paste/show/508389db7d609

What I am trying to achieve with the leftjoin is to only select projects who have a projectimage that's Home value is 1 (true).

Can anyone point me in the right direction?

Avatar
fyrebase

Community Member, 7 Posts

21 October 2012 at 7:43pm

Thanks to simon_w on SS IRC

ProjectPage::get()->filter('Images.Home:ExactMatch', 1)