Running a query over multiple Databases?

From: Christian Mittendorf (christian.mittendor..reenet.de)
Date: Fri Mar 16 2007 - 11:26:02 EDT

  • Next message: Peter Schröder: "AW: How do I filter on mysql date?"

    Hi!

    I've found the mutiple database example on cayennes homepage:

    http://cwiki.apache.org/CAY/multiple-databases-example.html

    That example is a pretty good resemblance of our current problem.

    What we would like to do is to run a single query over both
    databases, like i.e.

    SelectQuery select = new SelectQuery(Person.class);
    Expression expression = ExpressionFactory.matchExp
    (Person.DEPARTMENT_PROPERTY +
            "." + Department.NAME_PROPERTY, "IT Department");

    But such a query runs into an exception with the following error
    message:

    Base table or view not found, message from server: "Table 'foo.bar'
    doesn't exist"

    Are such queries supported by Cayenne or do we have to split the task
    into
    two single queries?

    Christian



    This archive was generated by hypermail 2.0.0 : Fri Mar 16 2007 - 11:26:50 EDT