cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "tony@giaccone.org"<t...@giaccone.org>
Subject Re: Multiple data sources
Date Tue, 12 Dec 2017 15:45:38 GMT
MRG, 

I'm using the most recent version of Cayenne. My question is more about how you instantiate
the two data stacks in the application. Do they belong in separate data models? Or two nodes
in the same model?  Do you run two separate cayenne stacks, with different contexts? 

But with your answer I think I understand how to get started. 


Tony

On 2017-12-07 14:36, Michael Gentry <blacknext@gmail.com> wrote: 
> Hi Tony,
> 
> I've not done this before, but pretty sure you'll need two DataNodes (to
> manage the two DB connections, one DB per node) and two DataMaps (one
> attached to each DataNode).  Put the relevant Java classes/etc in the
> proper DataMap and Cayenne will then handle the routing for you.  (Cayenne
> determines which DataNode to use based upon the Java class/package that is
> contained in each DataMap.)
> 
> BTW, which version of Cayenne are you using?
> 
> mrg
> 
> 
> On Thu, Dec 7, 2017 at 1:50 PM, Tony Giaccone <tony@giaccone.org> wrote:
> 
> > What's the general technique for using multiple data sources with a cayenne
> > project?
> >
> > I want to read from one table, and then use that data to collect data from
> > a second database, and validate certain values.
> >
> > Anyone have a specific example of this kind of work?
> >
> >
> >
> > Tony Giaccone
> >
> 

Mime
View raw message