ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ingmar Lötzsch <iloetz...@asci-systemhaus.de>
Subject Re: Need help on Inserting child Object .
Date Sun, 08 Feb 2009 22:38:57 GMT
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

Mime
View raw message