ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob van der Leek <...@ricardis.tudelft.nl>
Subject Abator and XML namespaces
Date Thu, 29 Jun 2006 12:54:00 GMT
Hi all,

I'm using Abator (0.6.5) to generate the models, SQL maps and 
Spring-based DAO's for my database connection based on iBATIS (2.1.7).

The sql maps that abator generates have unique namespaces, for example:

<sqlMap namespace="country">
	<select id="abatorgenerated_selectByPrimaryKey" ...

The spring-based dao's that abator generates contain references to 
operations defined in the sql maps like this:


(the getSqlMapClientTemplate() method is implemented in the spring 
framework, I'm using Spring 1.2.8)

If I'm using a dao like this:

CountryDAO countryDAO = (CountryDAO)context.getBean("countryDAO");
Country country = countryDAO.selectByPrimaryKey(key);

I'm getting the following exception:

  com.ibatis.sqlmap.client.SqlMapException: There is no statement named 
countries.abatorgenerated_selectByPrimaryKey in this SqlMap.

It looks like iBATIS ignores the namespace definition in the sql map, 
because everything works fine if I change the call in the dao to:


I'm only using iBATIS & abator for two days now, so if I supplied the 
wrong or insufficient/confusing info please let me know.

Thanks in advance, Rob

View raw message