Hi,
a new challenge
Suppose i have the following setup:
A language table with a language code (1033 for english, 1036 for french, 1043 for dutch, ...)
I have then an entity "Entity" with a 1:n relation to the EntityLocale table, which has 3 fields : entity_id, lang_code, entity_description.
What i want now is to fetch a collection EntityLocaleCollection for a specified EntityId, with a record for EACH possible languages in the language table, not only the ones that allready exist
For example, assume we have an Entity with id 1 with the following records in the EntityLocale Table
1 - 1033 - My description
1 - 1043 - Mijn Omschrijving
What i want, when the language table holds 3 languagues (1043,1033,1036), is the following collection returned:
1 - 1033 - My Description
1 - 1043 - Mijn omschrijving
1 - 1036 - <NULL>
How can i do this quick an simple (with an outer join i suppose) ? I just KNOW llbl is so good it must be possible, but i just don't see it. Last night i put something together to solve this, but it is so ugly, you don't wanna know, it involves a nested foreach