If both <sqlMap> nodes are in your <sqlMapConfig> node, then it's a matter
of ordering... <sqlMap> nodes can refer to statement and result maps that
are present in previous <sqlMap> nodes.

For example:

<sqlMapConfig>
...
<sqlMap resource="A"/>
<sqlMap resource="B"/>
<sqlMap resource="C"/>

</sqlMapConfig>

Here, B can reference stuff from A and C can reference stuff from B and A...

Cheers,
Philippe

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 01, 2004 10:54 AM
To: ibatis-user-java
Subject: Link between SqlMaps


Hi,
Is there a way to reference a statement from a sqlMap in one another ? It
would be a good thing for modularity.
For instance, I have 2 business objects, let's say address and city:
I would like 2 DAO, packaged in 2 jar with their own SqlMap xml files
(Of course, my sql-config for my application includes both SqlMaps !)
If I want to use lazyLoading to load the city of an address, I need to
reference the "getCityById" statement in the "getAddressById_result". But
this element is in another map, and so not found !
Please help ! Thank you.



---------------------------------------------------------------- <Publicit�>
JOUEZ AVEC NEUF TELECOM ! 
D�couvrez un nouveau jeu des bestioles: elles d�testent les offres Internet
ch�res et d�truisent tout sur leur passage ! 
O� �� ? Sur leur nouveau site internet � d�couvrir absolument :
http://www.laccesinternetquivousrendbeauetcelebre.com

Reply via email to