How to define Multiple datamap.xml files

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

How to define Multiple datamap.xml files

Kumar
Guys,

A quick question. I am working on a project where we have around 2600 db
entities. Currently my datamap.xml contains all the dbentity, objentity,
dbrelationship and objrelationship. But the xml is too big and opening the
xml and doing any changes seems very laggy.

I heard that we can have multiple datamap.xml files and configure it in the
cayenne-project.xml. Currently i defined few of my mapped queries in a
separate xml and added that xml in the cayenne-project.xml. It is working
as expected.

Same like that can i move few of my dbentity, objentity,
dbrelationship and objrelationship to
a separate datamap.xml file?
I tried but not working. Do i need to follow any order?

Thanks in Advance,
Kumar.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to define Multiple datamap.xml files

Andrus Adamchik
You don't need to do anything special. You just create as many DataMaps in your project as needed. You can have relationships between entities in different DataMaps. Though if you can avoid such relationships, it usually results in a model that is easier to manage.

Andrus

> On Jan 1, 2017, at 7:14 PM, Kumar <[hidden email]> wrote:
>
> Guys,
>
> A quick question. I am working on a project where we have around 2600 db
> entities. Currently my datamap.xml contains all the dbentity, objentity,
> dbrelationship and objrelationship. But the xml is too big and opening the
> xml and doing any changes seems very laggy.
>
> I heard that we can have multiple datamap.xml files and configure it in the
> cayenne-project.xml. Currently i defined few of my mapped queries in a
> separate xml and added that xml in the cayenne-project.xml. It is working
> as expected.
>
> Same like that can i move few of my dbentity, objentity,
> dbrelationship and objrelationship to
> a separate datamap.xml file?
> I tried but not working. Do i need to follow any order?
>
> Thanks in Advance,
> Kumar.

Loading...