The code looks reasonable. Have you checked the SQL generated by Cayenne,
from the log?
----- Original Message -----
From: "Lothar Krenzien" <lkrenzie..eb.de>
To: <cayenne-use..bjectstyle.org>
Sent: Friday, September 16, 2005 3:55 AM
Subject: <kein Betreff>
>
> Hi there,
>
> I'm new to Cayenne but have to maintain an existing application which uses
Cayenne. And know I have problem which I doen't understand.
>
> I have a database view which returns a single row for every day of in a
given time period. For example from 1st of March to 30nd of May totally 160
rows. When I execute the query against the view all seems to be correct.
But in cayenne I have only the values from April to May. And all of these
values are doubled so that the totally size of data is also 160 (like in the
view). For the moment I have this problem only with one query.
>
> Here's the cayenne query:
>
> DataContext context = ...
> Expression exprMeasuredData = ....
> SelectQuery query = ....
>
> exprMeasuredData = ExpressionFactory.matchExp("invertorId",
Integer.parseInt(invertorId)).andExp(
> ExpressionFactory.matchExp("dataYear", (new
Day(date)).getYear()));
> query = (new SelectQuery(ViewInvertorMonthlyValues.class,
exprMeasuredData));
> query.addOrdering("dataDate", true);
> List result = context.performQuery(query);
>
> I'm using Java5, Tomcat 5.5, Cayenne 1.2M4 and MSSQL 2000.
>
> Thanks for any help
> Lothar
>
> ______________________________________________________________
> Verschicken Sie romantische, coole und witzige Bilder per SMS!
> Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193
>
This archive was generated by hypermail 2.0.0 : Fri Sep 16 2005 - 09:20:18 EDT