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 (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com