You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by "Firas A." <of...@idigna.com> on 2006/05/09 20:04:48 UTC
queryForMap returning zero results
Hello everybody!
I'm getting zero results when using queryForMap. Whith queryForList I get
the correct results.
----- SQLMap -----
<resultMap id="listOfCategories"
class="com.mycompany.ecommerce.ProductCategory">
<result column="product_category_id" property="productCategoryId"
jdbcType="VARCHAR" />
<result column="parent_category_id" property="parentCategoryId"
jdbcType="VARCHAR" />
<result column="category_name" property="categoryName"
jdbcType="VARCHAR" />
</resultMap>
<select id="listAvailableCategories" resultMap="listOfCategories">
SELECT
product_category_id,
parent_category_id,
category_name
FROM product_category
</select>
----- Java -----
public Map listAvailableCategories() throws SQLException {
Map prodCatRel = sqlMapClient.queryForMap("listAvailableCategories",
null, "productCategoryId");
return prodCatRel;
}
In the logging output I can clearly see that there are several rows in the
resultset, but prodCatRel.size()==0.
Anybody have an idea?
Thanks for your time!
</Firas>