<kein Betreff>

From: Lothar Krenzien (lkrenzie..eb.de)
Date: Fri Sep 16 2005 - 03:55:29 EDT

  • Next message: Christoph Sturm: "cayenne and spring"

    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 - 03:55:34 EDT