Hello, (and Happy new year)
I'm new to Cayenne.
I have to use some raw SQL in a part of my application.
In WebObjects i used the EOUtilies.rawrowsforSQL method.

In Cayenne, there is the SQLTemplate to use raw SQL but it seems that it doesn't work well on complex SQL requests.

I tried a SELECT command like :
SELECT... FROM (SELECT .... FROM (SELECT ... FROM TABLE))
and there is a problem.
The DataObject does not retrieve his ID (it's normal because it's not possible to map it) but the DataRow seems to be correct).

Is it possible to have a collection of DataRows in an HashMap, instead of a collection of DataObjects?

I made a SQL request so you can see what i'm saying.


SELECT DISTINCT a.idtable newidTable, idColumn FROM TABLE a

Null value for 'IDTABLE'. Snapshot: [EMAIL PROTECTED] [values={IDCOLUMN=86008, NEWIDTABLE=9687}, version=-9223372036854775807, replaces=-9223372036854775808]. Prefix: null

Thanks for your help
Steve.


Reply via email to