changing the connection? any Idea please
kind regards
Frank
The easiest is just to place multiple persistence mappers/connection
pairs on the EcoSpace, and configure each one.
At runtime you just need to set the PersistenceMapper property of the
EcoSpace to the right one prior to activating the EcoSpace.
How do you intend to make the selection, via a register setting?
--
Jan Nordén
Senior Software Architect
MDA products group
kind regards
frank
kind regards
"Jan Nordén [Borland]" <jan.n...@borland.com> escribió en el mensaje
news:439c5395$1...@newsgroups.borland.com...
> I think to set using the xml file config.exe file, is correct it?
>
>
Any way of setting the configuration should work fine. I was just
curious.
> The easiest is just to place multiple persistence mappers/connection
> pairs on the EcoSpace, and configure each one.
Wouldn't it be easier to set up a BDP connection and then just
configure the connection string for the BDP connection?
--
Marc Rohloff [TeamB]
marc rohloff -at- myrealbox -dot- com
> On 11 Dec 2005 08:28:05 -0700, Jan Nordén [Borland] wrote:
>
> > The easiest is just to place multiple persistence mappers/connection
> > pairs on the EcoSpace, and configure each one.
>
> Wouldn't it be easier to set up a BDP connection and then just
> configure the connection string for the BDP connection?
No. There are various things in the configuration of the
BdpPersistenceMapper that need to be different for different databases.
> No. There are various things in the configuration of the
> BdpPersistenceMapper that need to be different for different databases.
Most of that configuration sits in PersistenceMapper.SqlDatabaseConfig. It
is possible to set in the same way as using the component editor menu
options by invoking
Borland.Eco.Persistence.Configuration.InitializeDbEngineSettings(DataBaseEngine
engine, SqlDatabaseConfig sqlDatabaseConfig).
--Jesper
I found this to be an interesting thread because I am looking into doing
something similar.
Is it possible to divide up an EcoSpace across more than one database?
For instance, Customer objects would exist in say a Sales database.
Invoice objects would exist on an Accounting database. These databases
may not be on the same machine or be even the same db vendor.
Or will I have to use multiple EcoSpaces? I've never tried that. I guess
I can still query across spaces. Example, show me all Invoices belonging
to an instance of a Customer.
> Jan Nordén [Borland] wrote:
> > The easiest is just to place multiple persistence mappers/connection
> > pairs on the EcoSpace, and configure each one.
> >
> > At runtime you just need to set the PersistenceMapper property of
> > the EcoSpace to the right one prior to activating the EcoSpace.
>
> I found this to be an interesting thread because I am looking into
> doing something similar.
>
> Is it possible to divide up an EcoSpace across more than one
> database? For instance, Customer objects would exist in say a Sales
> database. Invoice objects would exist on an Accounting database.
> These databases may not be on the same machine or be even the same db
> vendor.
That is what the PersistenceMapperMultiDb is for. It is sort of a
dispatcher for databases. It is primarily designed for the case where
you have multiple databases to start with, and want to consolidate them
in one ecospace, and not where you have one model and want to split up
the data into multiple databases (why would you want that anyway?).
There are some issues with creating and evolving databases in a MultiDb
setup.
> Or will I have to use multiple EcoSpaces? I've never tried that. I
> guess I can still query across spaces. Example, show me all Invoices
> belonging to an instance of a Customer.
Well, you can't have cross-ecospace-relations... you would have to rely
on CustomerId or something, and cascading deletes and other nifty stuff
won't work.
--
/Jonas, Borland Eco R&D