I can’t seem to get this working. Is it even supported?
User.xml:
<sqlMap namespace="User">
<typeAlias alias="user" type="com.jivesoftware.profiles.model.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" select="CategoryValue.getCategoryValuesForUserId"/>
</resultMap>
…
</sqlMap>
CategoryValue.xml:
<sqlMap namespace="CategoryValue">
<typeAlias alias="categoryValue" type="com.jivesoftware.profiles.model.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 = #value#
ORDER BY value
</select>
…
</sqlMap>
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
[EMAIL PROTECTED]
www.jivesoftware.com
317 SW Alder, Ste 500
Portland, OR 97204
ph (503) 295-6552
fx (503) 961-1047
