Hi Borut, you may want to look at my copying DataMaps example: http://cwiki.apache.org/CAY/copying-datamaps.html
It is old (still references "objectstyle" instead of "apache", but might work fine with minor changes (like changing the package name). (I haven't tried it on Cayenne 2.x+ yet.) I was able to use the same classes across different DataDomains/DataNodes even within the same running application using this technique. (I had 7 active database connections to development (x2), testing (x2), acceptance (x2), and production (x1) databases for a support program to examine application data internals.) The trick is to create your DataContext passing it the correct DataDomain/DataNode to use and then all is well. Cayenne handled everything very smoothly after that -- everything went to the proper database connection since the DataContext (which was created with the DataDomain/DataNode to use) does all the queries and the commits. mrg On Tue, Jun 16, 2009 at 6:03 AM, Borut Bolčina<[email protected]> wrote: > Hi, > > is it somehow possible to have two DomainNodes (2 different independent > databases) with the same entity/class name? Both databases have table > (entity) "user" and I don't want to rename one class to UserSomething. > > Regards, > Borut >
