cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrus Adamchik <and...@objectstyle.org>
Subject Re: Probkem with SQLTemplate
Date Fri, 04 Nov 2011 12:15:51 GMT
Hi Markus,

The observed behavior means that Cayenne doesn't know how to map the result data to a object
(we should probably detect this condition and throw an exception, but that's the way it is
now).

You need to ensure that you include all columns that are mapped for a given entity in Cayenne
model in your SELECT clause (or do "SELECT * ... "). Once you've done that, another caveat
is column name capitalization, so you may have to enforce UPPER or LOWER caps strategy:

http://cayenne.apache.org/doc30/advanced-sqltemplate.html

Andrus

On Nov 4, 2011, at 2:31 AM, Markus Reich wrote:

> Hi community,
> 
> I'm trying to receive a SELECT DISTINCT query by a SQLTemplate call, I got
> the right count of objects, but all objects are NULL?
> I've tried nearly everything, with and without #result directive ...
> 
> The strange thing is, that I didn't get any exceptions thrown? Is there a
> way to use a deeper logging?
> 
> regards
> Markus


Mime
View raw message