Re: Error when join table spans datamaps

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Fri May 19 2006 - 18:06:25 EDT

  • Next message: Mike Kienenberger: "Re: Error when join table spans datamaps"

    On May 19, 2006, at 5:57 PM, Mike Kienenberger wrote:

    > On 5/18/06, Andrus Adamchik <andru..bjectstyle.org> wrote:
    >> Short of
    >> horrible performance, maybe doing joins within Cayenne SQLAction code
    >> is not such bad an idea???
    >
    > Taking a brief look at SQLAction -- Is there a way to register an
    > observer/delegate with the engine from the application that can return
    > an alternate query to execute?

    One way to customize SQLAction is to subclass a query itself
    overriding 'createSQLAction'. But this won't work for relationships
    of course.

    Alternatively you can use DataConextDelegate to intercept the queries
    and if needed wrap them in a custom decorator that builds the right
    SQLAction (check various indirect queries on how the decorator might
    look like, e.g. ObjectIdQuery).

    Andrus



    This archive was generated by hypermail 2.0.0 : Fri May 19 2006 - 18:06:53 EDT