From: Simon <si...@po...> - 2009-12-28 00:35:56
|
hi - i've modelled an ERAttachment as per the docs with a relationship modelled from a new non-class, allows null property ("id_attachment") to ERAttachment.id. i can then add an attachment and subsequently view it (using ERAttachmentLink). everything works fine.... until i restart the app. Once the app has restarted and i go back and try and view an attachment that i previously uploaded i get this exception: java.lang.IllegalStateException: The object with globalID _EOIntegralKeyGlobalID[ERAttachment (java.lang.Integer)777036] could not be found in the database. This could be result of a referential integrity problem with the database. An empty fault could not be created because the object's class could not be determined (e.g. the GID is temporary or it is for an abstract entity). A bit strange. When i turn on SQL debugging in can't even see the app attempt to fetch the ERAttachment object from the DB. So, i changed my model so that the relationship was directly to the subclass i am using (ERS3Attachment) and now it all works fine even after a DB restart. So are the docs wrong ? or have i got something screwed up that is making it fail when i model to ERAttachment ? thanks, simon |