ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Niels Beekman" <n.beek...@wis.nl>
Subject RE: Mapping across namespaces
Date Wed, 07 Sep 2005 17:22:52 GMT
Are you including CategoryValue.xml before User.xml? iBATIS currently
has a loading-order dependency, so all statements referenced should
already be loaded...





From: Patrick Lightbody [mailto:patrick@jivesoftware.com] 
Sent: woensdag 7 september 2005 19:18
To: user-java@ibatis.apache.org
Subject: Mapping across namespaces


I can't seem to get this working. Is it even supported?


<sqlMap namespace="User">

    <typeAlias alias="user"

    <resultMap id="userResult" class="user">

        <result property="id" column="user_id"/>

        <result property="username" column="username"/>

        <result property="passwordHash" column="password_hash"/>

        <result property="admin" column="admin"/>

        <result property="categoryValues" column="user_id"





<sqlMap namespace="CategoryValue">

    <typeAlias alias="categoryValue"


    <select id="getCategoryValuesForUserId"
resultMap="categoryValueResult" parameterClass="long">

        SELECT cv.category_id, cv.name, cv.description, cv.value

        FROM category_value cv, cat_user_value cuv

        WHERE AND cv.category_id = cuv.category_id AND cuv.user_id =

        ORDER BY value




I am getting this error:

--- The error occurred in mappings/User.xml.  

--- The error occurred while applying a result map.  

--- Check the User.userResult.  

--- Check the result mapping for the 'categoryValues' property.  

--- Cause: com.ibatis.sqlmap.client.SqlMapException: There is no
statement named CategoryValue.getCategoryValuesForUserId in this SqlMap.

Patrick Lightbody
Professional Services
Jive Software
317 SW Alder, Ste 500
Portland, OR 97204
ph (503) 295-6552
fx (503) 961-1047

View raw message