Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 35205 invoked from network); 2 Dec 2005 06:13:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 2 Dec 2005 06:13:41 -0000 Received: (qmail 93847 invoked by uid 500); 2 Dec 2005 06:13:40 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 93826 invoked by uid 500); 2 Dec 2005 06:13:39 -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 93815 invoked by uid 99); 2 Dec 2005 06:13:39 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Dec 2005 22:13:39 -0800 X-ASF-Spam-Status: No, hits=0.3 required=10.0 tests=HTML_FONT_BIG,HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of clinton.begin@gmail.com designates 64.233.162.203 as permitted sender) Received: from [64.233.162.203] (HELO zproxy.gmail.com) (64.233.162.203) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Dec 2005 22:15:07 -0800 Received: by zproxy.gmail.com with SMTP id 13so27176nzn for ; Thu, 01 Dec 2005 22:13:17 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=sVJB2iA5vywaSu2/1hbjVfa132HL691e20APRgSLd4jV8fWct/1dOpN/svdPisKxOQ6ZrLQcRYxJ1166o8F9Le1yziqEJgGKCmXBjjw5U4ejRrP70KZPGKt+QBsXz1VEgDJ5sBT+030HaSoZG0sPMbzOgMC8YsTBtVFnjx6n1GQ= Received: by 10.64.193.4 with SMTP id q4mr1315376qbf; Thu, 01 Dec 2005 22:13:15 -0800 (PST) Received: by 10.65.230.18 with HTTP; Thu, 1 Dec 2005 22:13:15 -0800 (PST) Message-ID: <16178eb10512012213i694d0b48l9b641d4f38f5b87e@mail.gmail.com> Date: Thu, 1 Dec 2005 23:13:15 -0700 From: Clinton Begin To: user-java@ibatis.apache.org Subject: Re: how can i get attribute from inbed object? In-Reply-To: <438F3248.7070802@graticule.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_5483_14106900.1133503995482" References: <438F3248.7070802@graticule.com> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------=_Part_5483_14106900.1133503995482 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline You're missing a comma.... insert into feature_set (format_id, projection_name, bounds) values(#format.id#, #projection.name#, box3d('BOX3D($bounds.minX$ $bounds.minY$, $bounds.maxX$ , $bounds.maxY$)')) On 12/1/05, David Moss wrote: > > Hi, > > Has anyone managed to get this to work? > > I'm trying to do something very similar, but it's not working. > > I have a class IProjection with a property name. If I try the following > map > > > > insert into feature_set (format_id, projection_name, bounds) > values(#format.id#, > #projection.name#, > box3d('BOX3D($bounds.minX$ $bounds.minY$, $bounds.maxX$ > $bounds.maxY$)')) > > > > I get an error 'BadSqlGrammarException - Check the parameter mapping for > the 'projection.name' property.' > > So..., the 'name' property may be incorrect, but it's not. iBATIS > throws an error long before getting this far if the property name is > invalid. > > I can't work out what's wrong. > (Interestingly, I assume it has happily parsed #format.id#!) > > Doesn't anyone have any insights? > > Thanks. Dave. > > > > > Hi, Clinton > > > > Would you please take a look at following message? i could not find > > any clues from ibatis example and docs. > > Does #handleby.id# will be treated as getHandleby().getId()? > > IF not, then, how can i create an Account with handleby User specified? > > Must i try insert and update at the same time? > > > > regards, > > alex > > > > On 11/19/05, *Alex Chew* > > wrote: > > > > Hi, all > > would you please help me for following issue, thanks advance. > > > > POJO: > > public class Account implements Serializable { > > private Long id; > > private String name; > > private Double deposit; > > private User handleby; > > } > > public class User implements Serializable { > > private Long id; > > private String username; > > private String password; > > } > > > > SQL: > > > > insert into ACCOUNT (ID,NAME, DEPOSITE, FK_HANDLEBY) > > values (#id#, #name#, #deposit#, #handleby.id#) > > > > > > *handleby.id * cannot work,the value inserted > > is NULL, and no other excpetion message. > > Must i get id of handleby > > User manually? > > > > regards > > Alex > > > ------=_Part_5483_14106900.1133503995482 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline You're missing a comma....


    insert into feature_set (format_id, projection_name, bou= nds)
    values(#format.id#,
    #projection.name#,
    box3d('BOX3D($bounds.minX$ $bounds.minY$, $bounds.m= axX$ ,
    $bounds.maxY$)'))


On 12/1/05, David Moss <davidm@g= raticule.com> wrote:
Hi,

Has anyone managed to get this to work?

I'm trying to do = something very similar, but it's not working.

I have a class IProjec= tion with a property name.  If I try the following map

<= ;insert id=3D"storeFeatureSet" parameterClass=3D"IFeatureSet= ">

    insert into feature_set (format_id, project= ion_name, bounds)
    values(#format.id#,
 &= nbsp;  #projection.name#,
    box3d('BOX3D= ($bounds.minX$ $bounds.minY$, $bounds.maxX$
    $bou= nds.maxY$)'))

</insert>

I get an error 'BadSqlGrammarException - Check the p= arameter mapping for
the 'projection.= name' property.'

So..., the 'name' property may be incorrect, bu= t it's not.  iBATIS
throws an error long before getting this far if the property name isinvalid.

I can't work out what's wrong.
(Interestingly, I assume= it has happily parsed #format.id#!)

Doesn't anyone have any insight= s?

Thanks. Dave.



> Hi, Clinton
>
> =    Would you please take a look at following message? i coul= d not find
> any clues from ibatis example and docs.
> Does #ha= ndleby.id# will be treated as getHandleby().getId()?
> IF not, then, how can i create an Account with handleby User speci= fied?
> Must i try insert and update at the same time?
>
>= ; regards,
> alex
>
> On 11/19/05, *Alex Chew* < chew.alex@gmail.com
> <mailto:chew.alex@gmail.com>> wrote:
>
>  &n= bsp;   Hi, all
>      wo= uld you please help me for following issue, thanks advance.
>
>      POJO:
> &nbs= p;   public class Account implements Serializable {
> =      private Long id;
>   &nb= sp;  private String name;
>     private= Double deposit;
>      private User ha= ndleby;
>     }
>     &nb= sp;public class User implements Serializable {
>   &nb= sp;  private Long id;
>      = private String username;
>     private String pas= sword;
>     }
>
>   &= nbsp;  SQL:
>      <insert= id=3D3D"insertAccount" parameterClass=3D3D"account">= ;
>     insert into ACCOUNT (ID,NAME, DEPOSITE, FK= _HANDLEBY)
>     values (#id#, #name#, #deposit#,= #handleby.id#)
>     </insert>
>
= >     *handleby.id < http://handleby.id/>* cannot work,th= e value inserted
>     is NULL, and no other excp= etion message.
>     Must i get id of handleby>     User manually?
>
>  &nb= sp;  regards
>     Alex
>

------=_Part_5483_14106900.1133503995482--