ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sven Boden <list...@pandora.be>
Subject Re: declarative - db schema
Date Sat, 11 Mar 2006 08:48:11 GMT
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
>
>
>
>


Mime
View raw message