Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 7668 invoked from network); 8 Sep 2006 21:10:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 8 Sep 2006 21:10:08 -0000 Received: (qmail 3244 invoked by uid 500); 8 Sep 2006 21:10:05 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 3236 invoked by uid 500); 8 Sep 2006 21:10:05 -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 3225 invoked by uid 99); 8 Sep 2006 21:10:05 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Sep 2006 14:10:05 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of Daniel.Pitts@cnet.com designates 216.239.124.18 as permitted sender) Received: from [216.239.124.18] (HELO cn-sfo1-mail-relay2.cnet.com) (216.239.124.18) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Sep 2006 14:10:04 -0700 Received: from cnet138.cnet.cnwk (cnet138.cnet.cnwk [10.16.0.65]) by cn-sfo1-mail-relay2.cnet.com (8.12.10/8.12.10) with ESMTP id k88L9fA3020068 for ; Fri, 8 Sep 2006 14:09:42 -0700 (PDT) X-Spam-Filter: check_local@cn-sfo1-mail-relay2.cnet.com by digitalanswers.org Received: from CNET6.cnet.cnwk ([10.16.0.102]) by cnet138.cnet.cnwk with Microsoft SMTPSVC(6.0.3790.1830); Fri, 8 Sep 2006 14:09:41 -0700 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C6D38B.1A0BFE3D" Subject: RE: select statement problem Date: Fri, 8 Sep 2006 14:09:41 -0700 Message-ID: <7E4302A18925394BAC32C7AD1ABE75D4E2F615@CNET6.cnet.cnwk> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: select statement problem Thread-Index: AcbTgyzXV3rwAwr5S4Ww+8BMNmwkvQAB85Mw From: "Daniel Pitts" To: X-OriginalArrivalTime: 08 Sep 2006 21:09:41.0772 (UTC) FILETIME=[1A0EA4C0:01C6D38B] 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_01C6D38B.1A0BFE3D Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Try executing the query manually in an sql client. Do you get any = results? If not, thats your problem. Also, make sure you're using namespaces properly. ________________________________ From: Okan =C7etin [mailto:okancetin@gmail.com]=20 Sent: Friday, September 08, 2006 1:12 PM To: user-java@ibatis.apache.org Subject: select statement problem Hello; I could not getting something from db. list object does not contain any = value. Do you have any idea ?=20 The code and xml map files: =20 1) Code =20 List list;=20 Reader reader =3D = Resources.getResourceAsReader("com/data/SqlMapConfig.xml"); SqlMapClient sqlMapper =3D = SqlMapClientBuilder.buildSqlMapClient (reader); reader.close();=20 //usr=3D(User)sqlMapper.queryForObject("selectAllUsers");=20 list=3DsqlMapper.queryForList("selectAllUsers"); 2) User.xml =20 =20 3) User.java public class User { private String firstname; // getter, setter methods..=20 Thanks for reply. --=20 ~ otomatik olu?turuldu: http://ocetin.net/log http://linux.beykent.edu.tr=20 ------_=_NextPart_001_01C6D38B.1A0BFE3D Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Try executing the query manually in an sql = client. Do you=20 get any results?
If not, thats your problem.
Also, make sure you're using namespaces=20 properly.


From: Okan =C7etin = [mailto:okancetin@gmail.com]=20
Sent: Friday, September 08, 2006 1:12 PM
To:=20 user-java@ibatis.apache.org
Subject: select statement=20 problem

Hello;
I could not getting something from db. list = object=20 does not contain any value.  Do you have any idea ? The code = and xml map=20 files:
       
1) Code =20

         &nbs= p; =20 List list;
            Reader reader = =3D=20 Resources.getResourceAsReader("com/data/SqlMapConfig.xml");          = ; =20 SqlMapClient sqlMapper =3D SqlMapClientBuilder.buildSqlMapClient=20 (reader);
          = ; =20 reader.close();
          = ; =20 //usr=3D(User)sqlMapper.queryForObject("selectAllUsers");           = ; =20 list=3DsqlMapper.queryForList("selectAllUsers");
2)=20 User.xml

<?xml = version=3D"1.0"=20 encoding=3D"UTF-8" ?>
<!DOCTYPE=20 sqlMap         =20 PUBLIC "-//ibatis.apache.org//DTD SQL Map = 2.0//EN"     =20
    "http://ibatis.apache.org/dtd/sql-map-2.dtd">
<sqlMap = namespace=3D"User">
  <!-- Use type aliases to avoid = typing the=20 full classname every time. -->
  <typeAlias alias=3D"User"=20 type=3D"com.domain.User"/>
  = <!--=20 Result maps describe the mapping between the columns returned       from = a query,=20 and the class properties.  A result map isn't        = necessary if=20 the columns (or aliases) match to the properties        = exactly.=20 -->
    = <!--   =20 <resultMap id=3D"UserResult" class=3D"User">        = <result property=3D"firstname" column=3D"firstname"/>      = </resultMap>=20
   -->
  <!-- Select with no parameters = using the=20 result map for Account class. -->   = <select=20 id=3D"selectAllUsers" >
    select firstname from=20 PUBLIC.user
  </select>
</sqlMap>

3)=20 User.java
public = class User=20 {
      private = String=20 firstname;
      // getter, = setter=20 methods..

Thanks for reply.

--
~
otomatik=20 olu?turuldu:
http://ocetin.net/log
http://linux.beykent.edu.tr=20 ------_=_NextPart_001_01C6D38B.1A0BFE3D--