I have a list of elements of different types with their corresponding identifier. Elements are grouped together with the group identifier:
Type | ID | GroupID
-----------------------
Type1 | 1234 | 1
Type1 | 2345 | 1
Type2 | 1234 | 1
Type3 | 1234 | 1
Type1 | 1234 | 2
I have separate tables for each type. Schemes are not completely connected with each other, therefore UNIONit is not an option:
Type1 <id, name, status>
Type2 <id, name, description, foo, bar>
Type3 <id, name, foobar, barfoo, foofoo, hoodeedoo>
Is there a way to get all the data combined into one list. Over time, we will add more types, and lists will be loaded for each group. Querying the above dataset for Group 1 will return the following [pseudo] data:
[
{ 1234, name, status },
{ 2345, name, status },
{ 1234, name, description, foo, bar },
{ 1234, name, foobar, barfoo, foofoo, hoodeedoo }
]
(update) Purpose of this request:
. , . , Type1, Type1 .. .