Hello IngMar,

I am Using postgresSql As my DB and I am using auto-generated  keys as my way 
to create new ID which is as follows:

<insert id="MSCPerfCntrMscMMSTblImpl"
parameterClass="com.hns.hss.nmf.server.log.manager.gensrc.MSCPerformance.impl.MSCPerfCntrMscMMSTblImpl">
        insert into MSCPerfCntrMscMMSTbl(
        seq_no,
        neinfo_id,
        rectimeStamp,
        index,
        numClsMrkUpdates,
        ciphrModeCntrlAttempt,
        succCiphrModeCntrl
        )
values
        (
        nextval ('MSCPerfCntrMscMMS_seq'),
        #neInfoId_0#,
        #timeStamp_0#,
        #index_1.value#,
        #numClsMrkUpdates_2.value#,
        #ciphrModeCntrlAttempt_3.value#,
        #succCiphrModeCntrl_4.value#)
</insert>


Looking forward to your response.

Regards
Rahul Saluja

-----Original Message-----
From: Ingmar Lötzsch [mailto:[email protected]]
Sent: Monday, February 09, 2009 4:09 AM
To: [email protected]
Subject: Re: Need help on Inserting child Object .

Hello, Rahul

> if (null == order.getOrderId()) {
> sqlMapClient.insert("Order.insert", order);
> } else {
> sqlMapClient.update("Order.update", order);
> }

> As I was going through above code I have few question why are checking
> it against null for insert , shouldn't that be checking for not null
>
> Though I can understand that It needs to be done at application level
> only using sql batch update but an explicit example of the same with
> corresponding entries in sqlmap would help . If somebody can put some
> light on this would help me in great manner.

what DBMS you are using? What is your application's/DB's way to create
new IDs?

Ingmar
The information contained in this e-mail is private & confidential and may also 
be legally privileged. If you are not the intended recipient, please notify us, 
preferably by e-mail, and do not read, copy or disclose the contents of this 
message to anyone.

Reply via email to