Hi Richard, ----- Original Message ----- From: "Richard Bowers" <[EMAIL PROTECTED]> To: "OJB Users List" <[EMAIL PROTECTED]> Sent: Monday, November 18, 2002 3:34 PM Subject: Multiple repositories
> Hi all. > > Can anyone offer any advice on using more than one repository at a time? > I have three separate databases, each with their own repository files, > and while I don't need to query so I join the databases in a single > query I do need to be able to switch between them depending on the class > I am querying. Sorry, I don't understand your problem (my fault). Could you please give me more information, a code example, ... What exactly does not work,... You say each DB has their own repository file, so could you get access to each DB via ODMG-api? Or do want to know how it will work? > I do need to be able to switch between them depending on the class > I am querying. open the Database for the target repository. You have to know the repository (DB) the given object/class belongs too. regards, Armin > > I'm using the ODMG interface to allow the use of OQL. The version of OJB > is 0.9.7. > > I've tried adapting the DescriptorRepository class to remember which > DescriptorRepository a class is loaded from, but am now running into > lots of problems with the repeated calls to > PersistenceBrokerFactory.defaultPersistenceBroker() throughout the code. > I don't really want to start changing more OJB code if I don't have to. > > > On a related note, is it possible to query across more than one table in > the where clause? For example: > > "select g from com.lsis.Gene g, com.lsis.GeneStableId gsi where > g.gene_id = gsi.gene_id and gsi.stable_id = $1" > > Both classes in this example will be in the same database & repository. > > Thanks in advance, > Richard. > > > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > > > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
