ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Philippe Laflamme" <philippe.lafla...@mail.mcgill.ca>
Subject RE: Link between SqlMaps
Date Fri, 03 Dec 2004 14:05:29 GMT
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:

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


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


-----Original Message-----
From: sherpavert@9online.fr [mailto:sherpavert@9online.fr] 
Sent: Wednesday, December 01, 2004 10:54 AM
To: ibatis-user-java
Subject: Link between SqlMaps

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é>
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 :

View raw message