Never mind, just noticed there isn't a comma between min and max values (which is terrible on the part of the API designers).
You can get ibatis to print the SQL it's using after parsing inline parameters. That might help you find the problem.
clinton
On 12/1/05, Clinton Begin <[EMAIL PROTECTED]> wrote:
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 < [EMAIL PROTECTED]> 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 id="storeFeatureSet" parameterClass="IFeatureSet">
insert into feature_set (format_id, projection_name, bounds)
values(#format.id#,
#projection.name#,
box3d('BOX3D($bounds.minX$ $bounds.minY$, $bounds.maxX$
$bounds.maxY$)'))
</insert>
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* < [EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>> 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 id=3D"insertAccount" parameterClass=3D"account">
> insert into ACCOUNT (ID,NAME, DEPOSITE, FK_HANDLEBY)
> values (#id#, #name#, #deposit#, #handleby.id#)
> </insert>
>
> * handleby.id < http://handleby.id/>* cannot work,the value inserted
> is NULL, and no other excpetion message.
> Must i get id of handleby
> User manually?
>
> regards
> Alex
>
