Re: I am stumped.SOLVED
Re: I am stumped.SOLVED
- Subject: Re: I am stumped.SOLVED
- From: James Cicenia <email@hidden>
- Date: Tue, 10 Aug 2004 17:06:45 -0500
some weird corruption between my model and my database. A database
backup somehow fixed the issue?!
On Aug 10, 2004, at 3:22 PM, James Cicenia wrote:
I am getting an error where webobjects is trying to update the wrong
table?!
Here is the sql it is generating:
com.webobjects.eoaccess.EOGeneralAdaptorException: EvaluateExpression
failed: <com.webobjects.jdbcadaptor.MySQLPlugIn$MySQLExpression:
"UPDATE portfolio_metric_list SET row_id = ? WHERE (row_id = ? AND
last_mod_date = ?)" withBindings: 1:0(rowid), 2:37(rowid), 3:2004-02-21
18:44:03(lastModDate)>:
Next exception:SQL State:S1009 -- error code: 1062 -- msg: Invalid
argument value, message from server: "Duplicate entry '0' for key 1"
[2004-08-10 15:17:08 CDT] <WorkerThread3>
com.webobjects.eoaccess.EOGeneralAdaptorException: EvaluateExpression
failed: <com.webobjects.jdbcadaptor.MySQLPlugIn$MySQLExpression:
"UPDATE portfolio_metric_list SET row_id = ? WHERE (row_id = ? AND
last_mod_date = ?)" withBindings: 1:0(rowid), 2:37(rowid), 3:2004-02-21
18:44:03(lastModDate)>:
Next exception:SQL State:S1009 -- error code: 1062 -- msg: Invalid
argument value, message from server: "Duplicate entry '0' for key 1"
HOWEVER, it is not supposed to be updating this table!
Here is the code that sets the table for this error:
I think it is this line: theItem.removeFromPortfolioMetricLists(pml);
here is the paths: theItem(project)-->>portfolioMetricLists(linking
array)<<--PortfoloMetricList
SO: Why is it trying to update the row_id of the table
portfolio_metric_list?
public void setPopupSelection (PortfolioMetricList theSel) {
if(!(theItem.portfolioMetricLists() == null)){
for(int j=0;j<theItem.portfolioMetricLists().count();j++){
PortfolioMetricList pml =
(PortfolioMetricList)theItem.portfolioMetricLists().objectAtIndex(j);
if(pml.portfolioMetric().equals(theMetricItem)){
if(theSel==null || !(pml.equals(theSel))){
System.out.println("pml is "+pml);
theItem.removeFromPortfolioMetricLists(pml);
}
break;
}
}
}
if(theSel!=null){
theItem.addToPortfolioMetricLists(theSel);
}
}
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.