Skip to Content
Former Member
Jan 26, 2015 at 12:58 PM

LEFT JOIN to localized properties table


When I execute a FlexibleSearch query like

 SELECT {unlocalized}, {localized} FROM {MyType}

I want to get a result that looks like

  unlocalized | localized
  foo         | bar
  baz         | NULL

but instead I get

  unlocalized | localized
  foo         | bar

because when the localized attribute is empty, there are no corresponding rows in the localized properties table mytypeslp, and the SQL contains a JOIN to retrieve the value of localized:

 SELECT item_t0.p_unlocalized , lp_t0.p_localized
 FROM mytypes item_t0 JOIN mytypeslp lp_t0 ON item_t0.PK = lp_t0.ITEMPK AND lp_t0.LANGPK =? 
 WHERE (item_t0.TypePkString=? )

I would like to tell hybris to do a LEFT JOIN rather than a JOIN. Is this possible? Or if not, is there another way to achieve the desired result?