This has been described in the DevGuide, refer to: "Simple Dynamic SQL Elements".
In my previous project, I read the schema name from a properties file and
passed it to the SqlMap statement via a parameter map.

Greetings,
Hans.

Sven Boden wrote:
There's no "defaultSchema=name" in iBatis. So that's not possible, I also don't think it's in the JDBC spec. The closest you can get for the moment is putting the default schema in a properties file:

  schema=yourschema

And then in the SqlMap use schema's explicitly as:

  select *
  from ${schema}.table

In your build procedure you can retrieve the properties for the specific environment you're building for.

Regards,
Sven

Gianluca Gaiotto wrote:

Thanks for your immediate reply.
But what I am trying to discover is which is (if exists!) the <properties /> tag (in the sql map config xml file) for expressing the default schema. And I don't want let the connection parameters determine which schema to use, just because in our database environment we could have different schemas per single connection.

-Gianluca


Sven Boden wrote:

Use property files... look at e.g. http://www.mail-archive.com/user-java@ibatis.apache.org/msg02598.html

Regards,
Sven








Reply via email to