cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Gentry" <blackn...@gmail.com>
Subject Re: Using one template datamap for many databases
Date Wed, 01 Oct 2008 18:41:31 GMT
Hi Jesper, I wrote that DD copying utility a while back and it
definitely works with multiple databases (I had 7 databases with the
same schema) at the same time -- at least it did under Cayenne 1.2 and
2.0.  What version of Cayenne are you using?

/dev/mrg

On Tue, Sep 30, 2008 at 7:55 PM, Jesper Grooss <jesper@tractrac.dk> wrote:
> Hi all
>
> Hope this has not been answered before, or is trivial, but I could not find
> any info, and it has proven difficult for us to solve:
>
> We have a set of databases that share the exact same structure. The
> databases are create dynamically, so we do not even know their names
> beforehand. We have created a datamap xml file once for a template database
> and are trying to reuse this template datamap for all the databases. Several
> of the databases are active at the same time.
>
> I am aware of the example in:
>  http://cwiki.apache.org/CAY/copying-datamaps.html
> but that seems only to work when you are not using the different databases
> at the same time.
>
> Our current solution is to update the schema name for each dbentity before
> every use of the datamap, but that is quite error prone and does not perform
> that very well (and not at all if/when we go multi-threaded...).
>
> Is there a smart way to do this? One option is to make a deep clone of the
> template datamap, and update the schema name then, but do we have to do that
> manually or is there a smarter way?
>
> Thanks
> Jesper
>

Mime
View raw message