ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leucht, Axel" <Axel.Leu...@prodv.de>
Subject AW: iBATIS insert does not execute
Date Fri, 18 Apr 2008 14:07:00 GMT
Can you describe the database table structure you're working on?

/Axel


>>-----Urspr√ľngliche Nachricht-----
>>Von: Chris Marshall [mailto:chris@campsbayterrace.com]
>>Gesendet: Freitag, 18. April 2008 16:02
>>An: user-java@ibatis.apache.org
>>Betreff: Re: iBATIS insert does not execute
>>
>>
>>Further to my previous reply - I have checked all field values to be
>>correct, with only the primary autogenerated key being null.
>>Regards Chris
>>
>>On 18/04/2008, Brandon Goodin <brandon.goodin@gmail.com> wrote:
>>> Is this the only insert that is not working for you? Do you 
>>have others that
>>> are working? What version of iBATIS are you using?
>>>
>>> Brandon Goodin
>>>
>>>
>>> On Fri, Apr 18, 2008 at 7:10 AM, Chris Marshall 
>><chris@campsbayterrace.com>
>>> wrote:
>>> > I have spent a couple of days on this and have read the FAQ and
>>> > googled without success, so hope I can get some help:
>>> > I am trying to persist an instance of the class:
>>> >
>>> > public class Role {
>>> >
>>> >    private Integer roleid;
>>> >    private Integer parentid;
>>> >    private String name;
>>> >    private String notes;
>>> >
>>> >    public Integer getRoleid() {
>>> >        return roleid;
>>> >    }
>>> > .......&c
>>> > }
>>> >
>>> > with role_SqlMap.xml the snipprt:
>>> >
>>> >  <insert id="insert" parameterClass="net.mycompany.Role">
>>> >    insert into role (RoleID, ParentID, Name, Notes)
>>> >    values (#roleid:INTEGER#, #parentid:INTEGER#, #name:VARCHAR#,
>>> > #notes:VARCHAR#)
>>> >  </insert>
>>> >
>>> > and the java statement:
>>> >
>>> > sqlMap.insert("role.insert", role);
>>> >
>>> > which generates the folloing log entry:
>>> >
>>> > DEBUG [http-8888-Processor4] - {conn-100009} Preparing Statement:
>>> > insert into role (RoleID, ParentID, Name, Notes)     
>>values (?, ?, ?,
>>> > ?)
>>> >
>>> > but no Executing Statement: or Parameters: entries.
>>> > Also no exception is thrown nor is anything writtent to 
>>the (MySQL)
>>> database.
>>> >
>>>
>>>
>>

Mime
View raw message