The way I set up for testing to use a different config xml file pointing to my in-memory hsqldb nodes and pass it to the ServerRuntime constructor.
On Tue, Oct 18, 2016 at 1:44 PM, John Huss <johnth...@gmail.com> wrote: > Hmmm, not sure. Another option is to define both nodes in CayenneModeler > and remove the one that you don't need at runtime before running any > queries or commits. > > On Tue, Oct 18, 2016 at 12:19 PM Hugi Thordarson <h...@karlmenn.is> wrote: > >> Thanks John, I had made it just about that far, but how do I obtain an >> instance of an adapter? >> >> Cheers, >> - hugi >> >> >> > On 18. okt. 2016, at 16:56, John Huss <johnth...@gmail.com> wrote: >> > >> > Something like this? >> > >> > Collection<DataNode> nodes = runtime.getDataDomain().getDataNodes(); >> > >> > for (DataNode node : nodes) { >> > >> > node.setAdapter(myNewAdapter); >> > >> > } >> > >> > On Tue, Oct 18, 2016 at 11:27 AM Hugi Thordarson <h...@karlmenn.is> >> wrote: >> > >> >> Hi all, >> >> when running tests I need to switch the DB adapter to H2Adapter (my >> >> DataNode has a Customer adaptor). How would this be easiest to do? >> >> >> >> Cheers, >> >> - hugi >> >>