You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-cs@ibatis.apache.org by Tony Johnson <to...@edenbrook.co.uk> on 2007/06/05 12:55:30 UTC

Multiple external

Hi,

 

I'm working on a large enterprise application that has a series of data
access assemblies for different functional areas. For example, we might
have one assembly that concentrates on customer details etc and another
that looks after invoices. In each assembly, there are hundreds of
embedded resource sqlmap configurations (generally one for each entity /
view).

 

When I come to pull these together into an application, my application's
sqlmap.config file then has to list out all of these sqlmap
configuration resources individually?

 

Ideally what I'd like to do is have each assembly pull together its own
<sqlmaps> section and then include these in my application's <sqlmaps> :
eg:

 

In sqlmaps.config as a resource in Project.Domain.Customers.dll:

<sqlmaps>

            <sqlmap embedded="Project.Domain.Customers.Customer.xml"/>

            <sqlmap embedded="Project.Domain.Customers.Contact.xml"/>

            <...etc>

</sqlmaps>

 

Then in sqlmaps.config as a resource in Project.Domain.Invoices.dll:

<sqlmaps>

            <sqlmap embedded="Project.Domain.Invoices.Invoice.xml"/>

            <sqlmap embedded="Project.Domain.Invoices.InvoiceLine.xml"/>

            <...etc>

</sqlmaps>

 

And finally to then use these in my application, my application's
sqlmaps section just needs to look like this:

<sqlmaps>

            <sqlmap embedded="Project.Domain.Customers.sqlmaps.config,
Project.Domain.Customers"/>

            <sqlmap embedded="Project.Domain.Invoices.sqlmaps.config,
Project.Domain.Invoices"/>

</sqlmaps>

 

Is this, or anything like it, possible without having to write out the
hundreds of sql map config files in my application project ?

 

Thanks,

Tony 
 
Edenbrook Ltd.
Registered in England and Wales
Company Number 4136328

www.edenbrook.co.uk

DISCLAIMER

This message has been sent via the Internet.  Internet communications are not secure against interception or modification.  Edenbrook Ltd therefore cannot guarantee that this message has not been modified in transit.  This message and any files transmitted with it are confidential and intended solely for the use of the addressee.  If you have received this message in error please notify the sender and destroy your copies of the message and any attached files.

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________

RE: Multiple external

Posted by Tony Johnson <li...@deepcode.co.uk>.
Yeah, that’s the element, but specifically what I’m looking to do is have a
bunch of ibatis mapping files as resources in an external assembly, but then
rather than adding all of them individually in the sqlmap.config file of the
host application, be able to add a map to another resource file in the
assembly that then loads all of the mappings it contains?

 

Cheers

Tony

 

 

  _____  

From: Miika Mäkinen [mailto:mmiika@gmail.com] 
Sent: 06 June 2007 12:16
To: user-cs@ibatis.apache.org
Subject: Re: Multiple external <sqlmaps>

 

Hi Tony,
I don't know for sure but sqlMapConfig element looks like what you are
after: http://ibatis.apache.org/docs/tools/abator/afterRunning.html 



On 6/6/07, Tony Johnson <li...@deepcode.co.uk> wrote:

 

Anyone have any ideas on this?

 

Cheers

Tony

 

 

 

  _____  

From: Tony Selke [mailto:tselke@liquidhub.com] 
Sent: 05 June 2007 12:29
To: user-cs@ibatis.apache.org
Subject: RE: Multiple external <sqlmaps>

 

I was also wondering the other day if there was some sort of "wildcard
format" for the sqlMap node.  All of my maps are in a single resource
assembly, but it would still be nice to simply say "here's an
assembly/directory, go get every resource/file with a name that matches the
pattern *.*.ibatis.map.xml".

 

*A most excellent product, BTW!* 

 

Tony

 

From: Tony Johnson [mailto:tony.johnson@edenbrook.co.uk] 
Sent: Tuesday, June 05, 2007 6:56 AM
To: user-cs@ibatis.apache.org
Subject: Multiple external <sqlmaps>

 

Hi,

 

I'm working on a large enterprise application that has a series of data
access assemblies for different functional areas. For example, we might have
one assembly that concentrates on customer details etc and another that
looks after invoices. In each assembly, there are hundreds of embedded
resource sqlmap configurations (generally one for each entity / view).

 

When I come to pull these together into an application, my application's
sqlmap.config file then has to list out all of these sqlmap configuration
resources individually?

 

Ideally what I'd like to do is have each assembly pull together its own
<sqlmaps> section and then include these in my application's <sqlmaps> : eg:

 

In sqlmaps.config as a resource in Project.Domain.Customers.dll:

<sqlmaps>

            <sqlmap embedded="Project.Domain.Customers.Customer.xml"/>

            <sqlmap embedded="Project.Domain.Customers.Contact.xml"/>

            <…etc>

</sqlmaps>

 

Then in sqlmaps.config as a resource in Project.Domain.Invoices.dll:

<sqlmaps>

            <sqlmap embedded="Project.Domain.Invoices.Invoice.xml"/>

            <sqlmap embedded="Project.Domain.Invoices.InvoiceLine.xml"/>

            <…etc>

</sqlmaps>

 

And finally to then use these in my application, my application's sqlmaps
section just needs to look like this:

<sqlmaps>

            <sqlmap embedded="Project.Domain.Customers.sqlmaps.config,
Project.Domain.Customers"/>

            <sqlmap embedded="Project.Domain.Invoices.sqlmaps.config,
Project.Domain.Invoices"/>

</sqlmaps>

 

Is this, or anything like it, possible without having to write out the
hundreds of sql map config files in my application project ?

 

Thanks,

Tony

 

 


Re: Multiple external

Posted by Miika Mäkinen <mm...@gmail.com>.
Hi Tony,
I don't know for sure but sqlMapConfig element looks like what you are
after: http://ibatis.apache.org/docs/tools/abator/afterRunning.html


On 6/6/07, Tony Johnson <li...@deepcode.co.uk> wrote:
>
>
>
> Anyone have any ideas on this?
>
>
>
> Cheers
>
> Tony
>
>
>
>
>
>
>  ------------------------------
>
> *From:* Tony Selke [mailto:tselke@liquidhub.com]
> *Sent:* 05 June 2007 12:29
> *To:* user-cs@ibatis.apache.org
> *Subject:* RE: Multiple external <sqlmaps>
>
>
>
> I was also wondering the other day if there was some sort of "wildcard
> format" for the sqlMap node.  All of my maps are in a single resource
> assembly, but it would still be nice to simply say "here's an
> assembly/directory, go get every resource/file with a name that matches the
> pattern *.*.ibatis.map.xml".
>
>
>
> **A most excellent product, BTW!**
>
>
>
> Tony
>
>
>
> *From:* Tony Johnson [mailto:tony.johnson@edenbrook.co.uk]
> *Sent:* Tuesday, June 05, 2007 6:56 AM
> *To:* user-cs@ibatis.apache.org
> *Subject:* Multiple external <sqlmaps>
>
>
>
> Hi,
>
>
>
> I'm working on a large enterprise application that has a series of data
> access assemblies for different functional areas. For example, we might have
> one assembly that concentrates on customer details etc and another that
> looks after invoices. In each assembly, there are hundreds of embedded
> resource sqlmap configurations (generally one for each entity / view).
>
>
>
> When I come to pull these together into an application, my application's
> sqlmap.config file then has to list out all of these sqlmap configuration
> resources individually?
>
>
>
> Ideally what I'd like to do is have each assembly pull together its own
> <sqlmaps> section and then include these in my application's <sqlmaps> : eg:
>
>
>
> In sqlmaps.config as a resource in Project.Domain.Customers.dll:
>
> <sqlmaps>
>
>             <sqlmap embedded="Project.Domain.Customers.Customer.xml"/>
>
>             <sqlmap embedded="Project.Domain.Customers.Contact.xml"/>
>
>             <…etc>
>
> </sqlmaps>
>
>
>
> Then in sqlmaps.config as a resource in Project.Domain.Invoices.dll:
>
> <sqlmaps>
>
>             <sqlmap embedded="Project.Domain.Invoices.Invoice.xml"/>
>
>             <sqlmap embedded="Project.Domain.Invoices.InvoiceLine.xml"/>
>
>             <…etc>
>
> </sqlmaps>
>
>
>
> And finally to then use these in my application, my application's sqlmaps
> section just needs to look like this:
>
> <sqlmaps>
>
>             <sqlmap embedded="Project.Domain.Customers.sqlmaps.config,
> Project.Domain.Customers"/>
>
>             <sqlmap embedded="Project.Domain.Invoices.sqlmaps.config,
> Project.Domain.Invoices"/>
>
> </sqlmaps>
>
>
>
> Is this, or anything like it, possible without having to write out the
> hundreds of sql map config files in my application project ?
>
>
>
> Thanks,
>
> Tony
>
>
>

RE: Multiple external

Posted by Tony Johnson <li...@deepcode.co.uk>.
 

Anyone have any ideas on this?

 

Cheers

Tony

 

 

 

  _____  

From: Tony Selke [mailto:tselke@liquidhub.com] 
Sent: 05 June 2007 12:29
To: user-cs@ibatis.apache.org
Subject: RE: Multiple external <sqlmaps>

 

I was also wondering the other day if there was some sort of "wildcard
format" for the sqlMap node.  All of my maps are in a single resource
assembly, but it would still be nice to simply say "here's an
assembly/directory, go get every resource/file with a name that matches the
pattern *.*.ibatis.map.xml".

 

*A most excellent product, BTW!*

 

Tony

 

From: Tony Johnson [mailto:tony.johnson@edenbrook.co.uk] 
Sent: Tuesday, June 05, 2007 6:56 AM
To: user-cs@ibatis.apache.org
Subject: Multiple external <sqlmaps>

 

Hi,

 

I'm working on a large enterprise application that has a series of data
access assemblies for different functional areas. For example, we might have
one assembly that concentrates on customer details etc and another that
looks after invoices. In each assembly, there are hundreds of embedded
resource sqlmap configurations (generally one for each entity / view).

 

When I come to pull these together into an application, my application's
sqlmap.config file then has to list out all of these sqlmap configuration
resources individually?

 

Ideally what I'd like to do is have each assembly pull together its own
<sqlmaps> section and then include these in my application's <sqlmaps> : eg:

 

In sqlmaps.config as a resource in Project.Domain.Customers.dll:

<sqlmaps>

            <sqlmap embedded="Project.Domain.Customers.Customer.xml"/>

            <sqlmap embedded="Project.Domain.Customers.Contact.xml"/>

            <.etc>

</sqlmaps>

 

Then in sqlmaps.config as a resource in Project.Domain.Invoices.dll:

<sqlmaps>

            <sqlmap embedded="Project.Domain.Invoices.Invoice.xml"/>

            <sqlmap embedded="Project.Domain.Invoices.InvoiceLine.xml"/>

            <.etc>

</sqlmaps>

 

And finally to then use these in my application, my application's sqlmaps
section just needs to look like this:

<sqlmaps>

            <sqlmap embedded="Project.Domain.Customers.sqlmaps.config,
Project.Domain.Customers"/>

            <sqlmap embedded="Project.Domain.Invoices.sqlmaps.config,
Project.Domain.Invoices"/>

</sqlmaps>

 

Is this, or anything like it, possible without having to write out the
hundreds of sql map config files in my application project ?

 

Thanks,

Tony

 


RE: Multiple external

Posted by Tony Selke <ts...@liquidhub.com>.
I was also wondering the other day if there was some sort of "wildcard
format" for the sqlMap node.  All of my maps are in a single resource
assembly, but it would still be nice to simply say "here's an
assembly/directory, go get every resource/file with a name that matches the
pattern *.*.ibatis.map.xml".

 

*A most excellent product, BTW!*

 

Tony

 

From: Tony Johnson [mailto:tony.johnson@edenbrook.co.uk] 
Sent: Tuesday, June 05, 2007 6:56 AM
To: user-cs@ibatis.apache.org
Subject: Multiple external <sqlmaps>

 

Hi,

 

I'm working on a large enterprise application that has a series of data
access assemblies for different functional areas. For example, we might have
one assembly that concentrates on customer details etc and another that
looks after invoices. In each assembly, there are hundreds of embedded
resource sqlmap configurations (generally one for each entity / view).

 

When I come to pull these together into an application, my application's
sqlmap.config file then has to list out all of these sqlmap configuration
resources individually?

 

Ideally what I'd like to do is have each assembly pull together its own
<sqlmaps> section and then include these in my application's <sqlmaps> : eg:

 

In sqlmaps.config as a resource in Project.Domain.Customers.dll:

<sqlmaps>

            <sqlmap embedded="Project.Domain.Customers.Customer.xml"/>

            <sqlmap embedded="Project.Domain.Customers.Contact.xml"/>

            <.etc>

</sqlmaps>

 

Then in sqlmaps.config as a resource in Project.Domain.Invoices.dll:

<sqlmaps>

            <sqlmap embedded="Project.Domain.Invoices.Invoice.xml"/>

            <sqlmap embedded="Project.Domain.Invoices.InvoiceLine.xml"/>

            <.etc>

</sqlmaps>

 

And finally to then use these in my application, my application's sqlmaps
section just needs to look like this:

<sqlmaps>

            <sqlmap embedded="Project.Domain.Customers.sqlmaps.config,
Project.Domain.Customers"/>

            <sqlmap embedded="Project.Domain.Invoices.sqlmaps.config,
Project.Domain.Invoices"/>

</sqlmaps>

 

Is this, or anything like it, possible without having to write out the
hundreds of sql map config files in my application project ?

 

Thanks,

Tony

 

 

Edenbrook Ltd.

Registered in England and Wales
Company Number 4136328

www.edenbrook.co.uk

DISCLAIMER

This message has been sent via the Internet.  Internet communications are
not secure against interception or modification.  Edenbrook Ltd therefore
cannot guarantee that this message has not been modified in transit.  This
message and any files transmitted with it are confidential and intended
solely for the use of the addressee.  If you have received this message in
error please notify the sender and destroy your copies of the message and
any attached files.


______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________