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...