cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam Yocum <>
Subject Join over Multiple Database
Date Wed, 23 Jan 2008 03:14:55 GMT
  I have a set up where there are multiple databases on one server that I need to query using
  Since they are on the same server and it is a MySQL server I can query across databases...
  SELECT ordr.order_id, customer.customer_id, customer.first_name FROM ordr.ordr
INNER JOIN customer.customer ON customer.customer_id = ordr.customer_id
AND customer.first_name LIKE '%adam%'
  I know that Cayenne will not allow me to do this sort of join even though technically the
server can do it if you explicitly name all the tables involved with a database prefix like
the above example.
  Is my best bet to just grab all the ordr_ids using a JDBC resultset writing the query myself,
and then create all the CayenneDataObjects using DataObjectUtils.objectForPK(id)?
  Any plans to implement some sort of super node that would allow joining over different databases
as long as they are part of the same super node?  Would it only work on MySQL and that is
why Cayenne doen't handle this sort of thing?  Does everyone else really keep their customers
and orders in the same DB?

Be a better friend, newshound, and know-it-all with Yahoo! Mobile.  Try it now.
  • Unnamed multipart/alternative (inline, 8-Bit, 0 bytes)
View raw message