Perfect !!!

Thanks for your help

Le 2 janv. 08 à 15:49, Andrus Adamchik a écrit :

Hi Steve,

Looks like you need to call SQLTemplate.setFetchingDataRows(true)

Andrus

On Jan 2, 2008, at 4:30 PM, Steve Troudart wrote:

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], NEWIDTABLE=9687}, version=-9223372036854775807, replaces=-9223372036854775808]. Prefix: null

Thanks for your help
Steve.




Reply via email to