Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 28366 invoked from network); 11 Aug 2006 12:42:18 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 11 Aug 2006 12:42:18 -0000 Received: (qmail 71230 invoked by uid 500); 11 Aug 2006 12:42:16 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 71212 invoked by uid 500); 11 Aug 2006 12:42:16 -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 71201 invoked by uid 99); 11 Aug 2006 12:42:16 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 Aug 2006 05:42:16 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=DNS_FROM_RFC_BOGUSMX,HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [207.162.51.5] (HELO pandore.ircm.priv) (207.162.51.5) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 Aug 2006 05:42:15 -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_01C6BD43.8625AAAC" Subject: RE: MySQL 'text' datatype mapping Date: Fri, 11 Aug 2006 08:41:53 -0400 Message-ID: <5820E7E2A928DB46824297946AC2024A9A5F2F@pandore.ircm.priv> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: MySQL 'text' datatype mapping Thread-Index: Aca89X8DMGa61ml1QmiTtjp0oVaQtAATclkg From: "Poitras Christian" 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_01C6BD43.8625AAAC Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable To prevent these problems, I suggest you use resultMaps! I always use them even if my properties have the same name in the databse (just in case something would change). =20 Christian ________________________________ From: Eric VanWieren [mailto:evanwieren@gmail.com]=20 Sent: Thursday, 10 August 2006 23:23 To: user-java@ibatis.apache.org Subject: Re: MySQL 'text' datatype mapping Oh my word. Ok, I am a dolt. since i was requesting 'desc' it was calling desc as in desc table. Oops.=20 Thanks though, Eric On 8/10/06, Eric VanWieren wrote:=20 Christian, =09 This is the declaration of the SourceClinic class =09 private String notes; =09 There are the appropriate getters and setters. =09 Here is the code for my SqlMap =09 =20 =20 =20 =09 This is the desc from the mysql database=20 mysql> desc sourceclinic; =09 +---------+-------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | =09 +---------+-------------+------+-----+---------+----------------+=20 | id | int(11) | | PRI | NULL | auto_increment | | name | varchar(50) | | UNI | | | | desc | text | YES | | NULL | | | visible | tinyint(1) | | | 1 | |=20 =09 +---------+-------------+------+-----+---------+----------------+ 4 rows in set (0.00 sec) =09 mysql>=20 =09 Thanks for any help you can give me.=20 =09 =09 Eric =09 =09 =09 =09 On 8/10/06, Poitras Christian wrote:=20 Can you send you sqlmap file? I use text fields with MySQL. So it is probably a config problem. =20 Christian ________________________________ From: Eric VanWieren [mailto:evanwieren@gmail.com]=20 Sent: Wednesday, 09 August 2006 11:22 To: user-java@ibatis.apache.org Subject: MySQL 'text' datatype mapping =09 =09 =09 Hello, =09 I have a field in one of my tables that is of type 'text' in my MySQL database. I am trying to map it back to a type of java.lang.String, but it keeps coming back telling me there is an error in my syntax.=20 =09 Am I missing something here? I can grab all the other values out of the table, just not the one for the field of type 'text' =09 Thanks in advance. =09 Eric -- iBatis newbie -- =09 ------_=_NextPart_001_01C6BD43.8625AAAC Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable
To prevent these problems, I suggest you = use=20 resultMaps!
I always use them even if my = properties have the same=20 name in the databse (just in case something would = change).
 
Christian


From: Eric VanWieren=20 [mailto:evanwieren@gmail.com]
Sent: Thursday, 10 August 2006=20 23:23
To: user-java@ibatis.apache.org
Subject: Re: = MySQL=20 'text' datatype mapping

Oh my word. Ok, I am a dolt. since i was requesting 'desc' it = was=20 calling desc as in desc table.

Oops.

Thanks=20 though,

Eric

On 8/10/06, Eric=20 VanWieren <evanwieren@gmail.com> = wrote:
Christian,

This is the declaration of the SourceClinic=20 class

private String notes;

There are the appropriate = getters=20 and setters.

Here is the code for my SqlMap

<sqlMap=20 namespace=3D"SourceClinic">
    =
   =20 <select id=3D"getSourceClinic" parameterClass=3D"int"=20 resultClass=3D"com.test.test.SourceClinic">
   =20     SELECT
       =20     ID         =    =20 as id,
           =20 NAME        as name, =
   =20         VISIBLE   =20     as visible,
    =    =20     DESC        as=20 notes
        FROM=20 SOURCECLINIC
        WHERE ID =3D=20 #value#
    </select>
   =20
</sqlMap>

This is the desc from the mysql database=20
mysql> desc=20 = sourceclinic;
+---------+-------------+------+-----+---------+--------= --------+
|=20 Field   | Type        | = Null |=20 Key | Default | = Extra         =20 |
+---------+-------------+------+-----+---------+----------------+ =
|=20 id      | int(11)    =20 |      | PRI | NULL    |=20 auto_increment |
| name    | varchar(50)=20 |      | UNI=20 |        =20 = |            =    =20 |
| desc    | = text       =20 | YES  |     | NULL   =20 = |            =    =20 |
| visible | tinyint(1)  |     =20 |     | 1      =20 = |            =    =20 | =
+---------+-------------+------+-----+---------+----------------+
= 4=20 rows in set (0.00 sec)

mysql>

Thanks for any help = you can=20 give me.

Eric



On 8/10/06, Poitras=20 Christian <Christian.Poitras@ircm.qc.ca> wrote:=20
Can you=20 send you sqlmap file?
I use=20 text fields with MySQL. So it is probably a config=20 problem.
 
Christian


From: Eric VanWieren [mailto:evanwieren@gmail.com]=20
Sent: Wednesday, 09 August 2006 11:22
To: user-java@ibatis.apache.org
Subject: = MySQL=20 'text' datatype mapping

Hello,

I have a field in one of my tables that is = of type=20 'text' in my MySQL database. I am trying to map it back to a type of = java.lang.String, but it keeps coming back telling me there is an = error in=20 my syntax.

Am I missing something here? I can grab all the = other=20 values out of the table, just not the one for the field of type=20 'text'

Thanks in advance.

Eric
-- iBatis newbie=20 --
=

<= BR> ------_=_NextPart_001_01C6BD43.8625AAAC--