Re: aggregate functions+mysql invalid group error

From: Robert Zeigler (rdzeigl...arizona.edu)
Date: Thu Jul 08 2004 - 16:10:15 EDT

  • Next message: Joris Melchior: "Re: Filter a to-many relationship"

    Andrus Adamchik wrote:

    > Hi Robert,
    >
    > I just retried our aggregate functions example with the latest
    Cayenne > and it works, generating GROUP BY and correct columns. I guess
    there
    > is some problem with the mapping. if you send your DataMap XML file
    > (or just the part of it related to the entities in question) this
    > should help in diagnosing your problem.

    I'm about 99% certain it's just a mapping problem. ;)
    However, I ended up rewriting things to use a SQLTemplate already. ;)
    I've gone ahead and attached the relevant portions of the datamap anyway
      as I would like to know what it is I'm doing wrong. =) Thanks for the
    help. (I'm also wondering if it's the way I'm constructing the
    expression; I've attached the relevant bits of code, as well)

    Robert

    >
    > On a side note, while DerivedDbEntities are not going away anytime
    > soon, now I tend to prefer using scriptable SQLTemplates as they are
    > much more powerful and less hassle to configure and use. In future
    > versions of Cayenne (after 1.1) we will allow using them instead of
    > DbEntities for object mapping. Right now this can be done manually, or
    > simply use DataRows instead of objects, as most aggregate data is
    > read-only display stuff anyway.
    >
    > Andrus
    >
    >







    This archive was generated by hypermail 2.0.0 : Thu Jul 08 2004 - 16:10:17 EDT