Re: Aggregate functions - Still no luck

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Sat Oct 25 2003 - 02:07:09 EDT

  • Next message: Andrus Adamchik: "[ANN] Cayenne 1.0.2 released"

    Aggregate functions present in Expression class are actually just
    confusing the issue. They indeed do not work... The point I was trying
    to explain in my post is that an arbitrary SQL function can be
    specified in the mapping of the derived DB entity, not via expression
    API.

    Open the project in the example that I sent using the Modeler, go to
    "PAINTING_STATS" DbEntity, open "Attributes" tab, and examine the
    "Spec" column. This column contains an arbitrary SQL string... Only
    the real column names are substituted with "... Each "%@" is a
    placeholder for the attribute of the main or "parent" entity. Values
    for these placeholders are configured using the "Edit Parameters"
    button in the bottom.

    Also take a look at the Artist class for the examples of how the
    queries are built for such entities.

    Andrus

    On Saturday, October 25, 2003, at 01:58 AM, Chumbo wrote:

    > to make matters even worse the following lines
    >
    > ----------
    > Expression test = ExpressionFactory.unaryExp(
    > Expression.MIN,
    > "contId");
    >
    > SelectQuery query = new SelectQuery(contact.class,test);
    > ----------



    This archive was generated by hypermail 2.0.0 : Sat Oct 25 2003 - 02:07:08 EDT