Code:
it3.svalue as Comment,
it4.svalue as Description,
it5.svalue as Manual
from items i
left outer join items_translations it on it.iitem_id = i.id
left outer join stores s on s.id = i.istore_id
left outer join items_types itypes on itypes.id = i.iorder_types_id
left outer join storehouses sh on sh.id = i.istorehouse_id
left outer join items_translations it3 on it3.itype_id = 3 // odavde
left outer join items_translations it4 on it4.itype_id = 4
left outer join items_translations it5 on it5.itype_id = 5 // do ovde je problem
where i.id = 349 and it.slanguage = 'en' and it3.slanguage = 'en' and it4.slanguage = 'en' and
it5.slanguage = 'en' and
it.itype_id = 1 and it3.iitem_id = i.id
and it4.iitem_id = i.id and it5.iitem_id = i.id
it3.svalue as Comment,
it4.svalue as Description,
it5.svalue as Manual
from items i
left outer join items_translations it on it.iitem_id = i.id
left outer join stores s on s.id = i.istore_id
left outer join items_types itypes on itypes.id = i.iorder_types_id
left outer join storehouses sh on sh.id = i.istorehouse_id
left outer join items_translations it3 on it3.itype_id = 3 // odavde
left outer join items_translations it4 on it4.itype_id = 4
left outer join items_translations it5 on it5.itype_id = 5 // do ovde je problem
where i.id = 349 and it.slanguage = 'en' and it3.slanguage = 'en' and it4.slanguage = 'en' and
it5.slanguage = 'en' and
it.itype_id = 1 and it3.iitem_id = i.id
and it4.iitem_id = i.id and it5.iitem_id = i.id
Problem je u ovim it3 it4 it5 join-ima. Probao sam nesto al ne ide...
Code:
...
on i.IstorehouseId equals sh.Identification
/*join it3 in myItemTranslationList
on 3 equals it3.ItypeId
join it4 in myItemTranslationList
on 4 equals it4.ItypeId
join it5 in myItemTranslationList
on 5 equals it5.ItypeId*/
where i.Identification == itemId && it.Slanguage == "en" && it.ItypeId == 1
select new
...
...
on i.IstorehouseId equals sh.Identification
/*join it3 in myItemTranslationList
on 3 equals it3.ItypeId
join it4 in myItemTranslationList
on 4 equals it4.ItypeId
join it5 in myItemTranslationList
on 5 equals it5.ItypeId*/
where i.Identification == itemId && it.Slanguage == "en" && it.ItypeId == 1
select new
...