• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
I am stumped.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

I am stumped.


  • Subject: I am stumped.
  • From: James Cicenia <email@hidden>
  • Date: Tue, 10 Aug 2004 15:22:34 -0500

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.


  • Follow-Ups:
    • Re: I am stumped.SOLVED
      • From: James Cicenia <email@hidden>
  • Prev by Date: Re: New EOGenerator Error
  • Next by Date: Re: New EOGenerator Error
  • Previous by thread: Re: New EOGenerator Error
  • Next by thread: Re: I am stumped.SOLVED
  • Index(es):
    • Date
    • Thread