|
Are you including CategoryValue.xml before
User.xml? iBATIS currently has a loading-order dependency, so all statements
referenced should already be loaded… Niels From: Patrick
Lightbody [mailto:[EMAIL PROTECTED] 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. _________________ |
Title: Mapping across namespaces
- RE: Mapping across namespaces Niels Beekman
- RE: Mapping across namespaces Patrick Lightbody
- RE: Mapping across namespaces Niels Beekman
- RE: Mapping across namespaces Patrick Lightbody
- Ibatis monitoring Connection to db Marco Berri
- Re: Ibatis monitoring Connection to db Clinton Begin
