Dods: Save reference object problem

Zvonimir Radulovic <[email protected]> Fri, 19 Dec 2003 07:34:01 -0800 (PST)
Newsgroups gmane.comp.java.enhydra.dods
Message-ID <[email protected]>
--0-304759308-1071848041=:38200
Content-Type: text/plain; charset=us-ascii


Hi Dods,

When I made changes on reference object attribute and save the object (parent object)

DODS throws exception:

. . . . 

Caused by: java.sql.SQLException: Invalid argument value: Duplicate entry '1000200' for key 1
        at org.gjt.mm.mysql.MysqlIO.sendCommand(MysqlIO.java:497)
        at org.gjt.mm.mysql.MysqlIO.sqlQueryDirect(MysqlIO.java:550)
        at org.gjt.mm.mysql.Connection.execSQL(Connection.java:885)
        at org.gjt.mm.mysql.PreparedStatement.executeUpdate(PreparedStatement.java:389)
        at com.lutris.appserver.server.sql.standard.StandardDBConnection.executeUpdate(Unknown Source)
        at com.lutris.appserver.server.sql.CoreDO.executeInsert(Unknown Source)
        at com.lutris.dods.builder.generator.dataobject.GenericDO.executeInsert(Unknown Source)

. . . .

DODS try to insert object instead of update it. 

I made some changes in templates but I don't think that is OK. What can I do?

Regards,

Z. Radulovic



---------------------------------
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing
--0-304759308-1071848041=:38200
Content-Type: text/html; charset=us-ascii

<DIV>
<P class=MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Hi Dods,</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">When I made changes on reference object attribute and save the object (parent object)</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">DODS throws exception:</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">. . . . </SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"></SPAN></FONT><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Caused by: java.sql.SQLException: Invalid argument value: Duplicate entry '1000200' for key 1<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.gjt.mm.mysql.MysqlIO.sendCommand(MysqlIO.java:497)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.gjt.mm.mysql.MysqlIO.sqlQueryDirect(MysqlIO.java:550)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.gjt.mm.mysql.Connection.execSQL(Connection.java:885)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.gjt.mm.mysql.PreparedStatement.executeUpdate(PreparedStatement.java:389)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at com.lutris.appserver.server.sql.standard.StandardDBConnection.executeUpdate(Unknown Source)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n
 bsp; at com.lutris.appserver.server.sql.CoreDO.executeInsert(Unknown
 Source)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at com.lutris.dods.builder.generator.dataobject.GenericDO.executeInsert(Unknown Source)</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">. . . .</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">DODS try to insert object instead of update it. </SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">I&nbsp;made some changes in templates but I don't think that is OK. What can I do?</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Regards,</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Z. Radulovic</SPAN></FONT></P></DIV><p><hr SIZE=1>
Do you Yahoo!?<br>
<a href="http://pa.yahoo.com/*http://us.rd.yahoo.com/evt=21260/*http://photos.yahoo.com">New Yahoo! Photos - easier uploading and sharing</a>
--0-304759308-1071848041=:38200--