ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Niels Beekman" <n.beek...@wis.nl>
Subject RE: Question on SQLMaps
Date Fri, 23 Sep 2005 12:50:31 GMT
Yes, as long as you define unique namespaces (you did that already) and
set useStatementNamespaces to true (in the main configfile).

Niels

-----Original Message-----
From: Dave, Rajeev [mailto:Rajeev.Dave@FMR.COM] 
Sent: vrijdag 23 september 2005 14:48
To: user-java@ibatis.apache.org
Subject: Question on SQLMaps

Hello,
The following is the scenario
1. I have a SQLMapConfig.xml which contains 2 sqlmap declarations. E.g.
<....
  <sqlMap resource="Dimension.xml" />
  <sqlMap resource="Hierarchy.xml" />
>

2. In each of the SQLMap xml's I have some select declarations

<sqlMap namespace="DimensionQuery">
  <select id="getId" resultClass="mypackage.Dimension">
    select dim_id as dimId from dim_table where dim_nm = #value#
  </select>
</sqlMap>
<sqlMap namespace="HierarchyQuery">
  <select id="getId" resultClass="mypackage.Hierarchy">
    select hier_id as hierId from hier_table where hier_ds = #value#
  </select>
</sqlMap>

Here please note that I have the same Id (getId) in both the sql map
declarations.

Here is my question. 

Is it possible to reuse the same id's across sqlmap xml's. 
I will appreciate if someone can help me here on this

Rgds,
Rajeev Dave

Mime
View raw message