Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 86266 invoked from network); 7 Sep 2005 17:58:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 7 Sep 2005 17:58:32 -0000 Received: (qmail 34296 invoked by uid 500); 7 Sep 2005 17:58:31 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 33960 invoked by uid 500); 7 Sep 2005 17:58:30 -0000 Mailing-List: contact user-java-help@ibatis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user-java@ibatis.apache.org Delivered-To: mailing list user-java@ibatis.apache.org Received: (qmail 33947 invoked by uid 99); 7 Sep 2005 17:58:30 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Sep 2005 10:58:30 -0700 X-ASF-Spam-Status: No, hits=0.1 required=10.0 tests=HTML_MESSAGE,HTML_NONELEMENT_20_30 X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [83.247.21.91] (HELO wis.nl) (83.247.21.91) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Sep 2005 10:58:42 -0700 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C5B3D5.A345CCD6" Subject: RE: Mapping across namespaces X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 Date: Wed, 7 Sep 2005 19:57:38 +0200 Message-ID: <50CA25BD6EEA954FA592C097399942E303F357C8@CM1.wis.local> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Mapping across namespaces thread-index: AcWz0B4bkXY8GfrzSiujJRbXNgV8EAAAIEPgAAAwZnAAAQs7MA== From: "Niels Beekman" To: X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N This is a multi-part message in MIME format. ------_=_NextPart_001_01C5B3D5.A345CCD6 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Then you probably didn't set useStatementNamespaces to "true" in the sqlMapConfig-file... =20 Niels =20 ________________________________ From: Patrick Lightbody [mailto:patrick@jivesoftware.com]=20 Sent: woensdag 7 september 2005 19:28 To: user-java@ibatis.apache.org Subject: RE: Mapping across namespaces =20 Changing the order didn't help, but removing the "CatetgoryValue" namespace did. I did some debugging and inside the delegate all the mappings are stored without any namespace. Why is that? =20 _________________ Patrick Lightbody Professional Services Jive Software patrick@jivesoftware.com www.jivesoftware.com 317 SW Alder, Ste 500 Portland, OR 97204 ph (503) 295-6552 fx (503) 961-1047=20 ________________________________ From: Niels Beekman [mailto:n.beekman@wis.nl]=20 Sent: Wednesday, September 07, 2005 10:23 AM To: user-java@ibatis.apache.org Subject: RE: Mapping across namespaces =20 Are you including CategoryValue.xml before User.xml? iBATIS currently has a loading-order dependency, so all statements referenced should already be loaded... =20 Niels =20 ________________________________ From: Patrick Lightbody [mailto:patrick@jivesoftware.com]=20 Sent: woensdag 7 september 2005 19:18 To: user-java@ibatis.apache.org Subject: Mapping across namespaces =20 I can't seem to get this working. Is it even supported? User.xml: ... CategoryValue.xml: ... ... I am getting this error: --- The error occurred in mappings/User.xml. =20 --- The error occurred while applying a result map. =20 --- Check the User.userResult. =20 --- Check the result mapping for the 'categoryValues' property. =20 --- Cause: com.ibatis.sqlmap.client.SqlMapException: There is no statement named CategoryValue.getCategoryValuesForUserId in this SqlMap. _________________ Patrick Lightbody Professional Services Jive Software patrick@jivesoftware.com www.jivesoftware.com 317 SW Alder, Ste 500 Portland, OR 97204 ph (503) 295-6552 fx (503) 961-1047 ------_=_NextPart_001_01C5B3D5.A345CCD6 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Mapping across namespaces

Then you probably didn’t set = useStatementNamespaces to "true" in the = sqlMapConfig-file…

 

Niels

 


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

 

Changing the order didn’t = help, but removing the “CatetgoryValue” namespace did. I did some = debugging and inside the delegate all the mappings are stored without any = namespace. Why is that?

 

_________________
Patrick Lightbody
Professional Services
Jive Software
patrick@jivesoftware.com
www.jivesoftware.com

317 SW Alder, Ste 500
Portland, = OR 97204
ph (503) 295-6552
fx (503) 961-1047


From: = Niels Beekman [mailto:n.beekman@wis.nl] =
Sent: Wednesday, = September 07, 2005 10:23 AM
To: user-java@ibatis.apache.org
Subject: RE: Mapping = across namespaces

 

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: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?

User.xml:=

<sqlMap namespace=3D"User">

    <typeAlias alias=3D"user" type=3D"com.jivesoftware.profiles.model.User"/>

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

    &nbs= p;   <result property=3D"id" = column=3D"user_id"/>

    &nbs= p;   <result property=3D"username" = column=3D"username"/>

    &nbs= p;   <result property=3D"passwordHash" = column=3D"password_hash"/>

    &nbs= p;   <result property=3D"admin" = column=3D"admin"/>

    &nbs= p;   <result property=3D"categoryValues" = column=3D"user_id" select=3D"CategoryValue.getCategoryValuesForUserId"/>=

    </resultMap>

</sqlMap>

CategoryValue.xml:

<sqlMap namespace=3D"CategoryValue">

    <typeAlias alias=3D"categoryValue" type=3D"com.jivesoftware.profiles.model.CategoryValue"/>

   

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

    &nbs= p;   SELECT cv.category_id, cv.name, cv.description, = cv.value

    &nbs= p;   FROM category_value cv, cat_user_value cuv

    &nbs= p;   WHERE AND cv.category_id =3D cuv.category_id AND cuv.user_id =3D = #value#

    &nbs= p;   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
patrick@jivesoftware.com
www.jivesoftware.com

317 SW Alder, Ste 500
Portland, = OR 97204
ph (503) 295-6552
fx (503) 961-1047

------_=_NextPart_001_01C5B3D5.A345CCD6--