• 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
ERAttachment error
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ERAttachment error


  • Subject: ERAttachment error
  • From: Ângelo Andrade Cirino <email@hidden>
  • Date: Mon, 10 Sep 2012 04:43:51 -0300

Hi,

As I said in a previous post, I have two applications using the same framework. In one of them I am able to use ERAttachments to add an image to an entity. But in the other application, trying to attach an image to an entirely different entity, I have the following:

EOGeneralAdaptorException: EvaluateExpression failed: <com.webobjects.jdbcadaptor._MySQLPlugIn$MySQLExpression: "INSERT INTO ERAttachment(size, width, height, attachmentDataID, available, thumbnail, creationDate, ownerID, configurationName, smallData, mimeType, originalFileName, webPath, id, proxied, storageType) VALUES (?, NULL, NULL, ?, ?, NULL, ?, NULL, NULL, NULL, ?, ?, ?, ?, ?, ?)" withBindings: 1:18160(size), 2:2(attachmentDataID), 3:true(available), 4:2012-09-10 04:16:43(creationDate), 5:"image/jpeg"(mimeType), 6:"miniatura.jpg"(originalFileName), 7:"/1.jpg"(webPath), 8:1(id), 9:true(proxied), 10:"db"(storageType)>:
    Next exception:SQL State:23000 -- error code: 1452 -- msg: Cannot add or update a child row: a foreign key constraint fails (`visionturtestes`.`erattachment`, CONSTRAINT `ERAttachment_attachmentDataID_id_FK` FOREIGN KEY (`attachmentDataID`) REFERENCES `ERAttachmentData` (`id`))
  at com.webobjects.eoaccess.EODatabaseContext._exceptionWithDatabaseContextInformationAdded(EODatabaseContext.java:4504)

The two applications are running simultaneously and I am updating one different entity in each one. Why does the same function present two different behaviours?

BTW, the ERAttachment used to work perfectly in the troubled application.

BTW 2: rule files that used to be loaded aren't being loaded anymore.

BTW 3: if I clean the models framework and the applications and rebuild them the error above is gone, for a while...

Angelo
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: ERAttachment error
      • From: Kieran Kelleher <email@hidden>
  • Prev by Date: Eclipse source of problems?
  • Next by Date: Re: Eclipse source of problems?
  • Previous by thread: Re: Eclipse source of problems?
  • Next by thread: Re: ERAttachment error
  • Index(es):
    • Date
    • Thread