On 5/26/05, Roberto Rabe (JIRA) <ibatis-dev@incubator.apache.org> wrote: > The relative path in <sqlMap> seems to be confusing enough with the app base > directory > being different by project. Now, a relative string path for the > SqlMap.config could end up > being hard-coded into the Configure() method call by alot of people and cause > the same > confusion if they deployed a DAL as a library that happened to be used for > web, windows, > and "test"/console apps.
This is slighly off topic, but I would like to suggest that in our own (Team iBATIS) examples, that we *always* assume people are going to be deploying the same configuration to multiple project types. Accordingly, I would suggest that we *never * use a relative path in our project examples, but always use a properties variable. When we do show a relative path in a reference guide, we should also remark that it is *not* considered a best practice to use that form. So, in the NetPetShop sqlmap.config, I'd like to add to the configuration + <properties resource="sqlmap.config.xml" /> and change the SqlMap to read - <sqlMap resource="Maps/Category.xml"/> + <sqlMap resource="${root}Maps/Category.xml"/> And then define ${root} in "sqlmap.config.xml". In this case it would be "./". If we agree that this is the best practice, I'll start making the changes once this issue is resolved, to petstore example and whereever else the idiom applies. -Ted..