Developer Forum »
Left join for sessionqueries
10 posts

Hi

 

I am making a session query where i join 3 classes like so:

 

var aliasUser = new AqlAliasTestUser();

var aliasOrder = new AqlAliasTestOrder();

var aliasOrderItem = new AqlAliasTestOrderItem();

 

var join = new AqlAliasRelCustomerOrders(aliasUser, aliasOrder);

var join2 = new AqlAliasRelOrderItems(join, aliasOrderItem, aliasOrder);

 

now when i query i only get results where i have hits in all 3 tables, however I don't always have orderitems, but I would like to search for them, giving a searchword, if they are present.

Can I do a left join in any way to achieve this?

 

regards

 

Christoffer

120 posts

The short answer: We do not currenly support left (or outer) joins. Only inner joins.

The long answer: Your alternatives is to do it in memory with LINQ, convert the search to a pure Lucense search or modify/expand the datamodel with some denormalization. etc.

1