Hi all, I don't seem to find an answer to somthing that i refuse to accept as "Not Possible" :)
Here is my HQL query: "SELECT new TestTable(t.id,t.param1,t.param2,t.param3,stps) FROM TestTable t left join t.steps as stps WHERE t.someObj.id IN (:someObjIds)"
TestTable has the following consturtor: public TestTable(Integer param1, Integer param2,Date param3,Date param4, Set steps)
i have tried to use Collection in constructor instead of a Set but it didn't work, the constructor will receive only the first item out of the collection as a parameter and not the entire collection as i expected.
in the query i also tried to use left join fetch t.steps, tried without left join at all, tried to surround the "stps" parameter in the constructor with "elements" like this: elements(stps)
but nothing worked... the reason i'm doing this is because TestTable is very big and has a lot of columns and assosiations but in this case i want only 4 columns and one collection. when one query can return up to 400,000 objects this becomes nenecessary.
any ideas anyone??? (btw, my name is Tomer)
|