Aggregate in a Qualifier

From: Joshua Pyle (joshua.t.pyl..mail.com)
Date: Mon Feb 14 2005 - 20:11:06 EST

  • Next message: Fredrik Liden: "Error running SelectQuery"

    I was hoping the following would be possible in Cayenne...

    Expression where = Expression.fromString(Maildata.WHEN_SENT_PROPERTY +
    " is null and " + Maildata.MAIL_ACTIONS_ARRAY_PROPERTY + ".size < 4
    ");
    SelectQuery query = new SelectQuery(Maildata.class);
    query.setQualifier(where);

    After ruunning my first test is was obvious that this is not possible :-)

    I was trying to avoid using the SQLTemplate due to the fact that I
    don't want to hard code the schema name for the tables in the java
    code.

    1. Is there any way to do something like a COUNT on a relationship in
    the Qualifier for a query?

    2. If no on 1 then is there a way I can get the schema name from the
    mappings? And perhaps how?

    Thanks in advance,

    Joshua T. Pyle
    Go has always existed.



    This archive was generated by hypermail 2.0.0 : Mon Feb 14 2005 - 20:11:11 EST