Hemant.Kamatgi wrote:
> Is there a way
> where I can pass the schema name from out side as a parameter so that we
> can maintain only one map file I mean, say for a query , ‘select * from
> <schema>.employee’ where <schema> is a place holder for a value that can
> be configured.
In fact there is. In your sqlmap-config.xml you can define a properties
file:
<properties resource="sqlmapconfig.properties" />
sqlmapconfig.properties looks like this:
schema1=foo
schema2=bar
Then you can use named properties everywhere in your sql mappings:
<select id="sampleSelect" parameterClass="..." resultClass="...">
select * from ${schema1}.tablename
</select>
Cheers,
Ole.