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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

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

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

SS3 - Leftjoin


Go to End


2 Posts   997 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)