hi daniel - we had exactly the same issue when we first set up ERAttachment. we worked around it by having all of our relationships to the specific subclasses.
i never got time to figure out what it was doing but i'd guess the inheritance is getting mixed up somewhere - it's as if ERAttachment isn't abstract and hence it's trying to fetch an EO with pk = 5 and storageType = "". maybe if you pump out the raw sql in your logs you could post the sql it's actually using to try and fetch the attachment...? simon On 2 April 2011 07:38, Daniel Mejia <[email protected]> wrote: > Hi all, > > I need some help with ERAttachments. I configured an attachment for an > entity as is explained in the Attachment tutorial. Everything goes fine at > the beginning, I can add new attachments, display a list with all my > attachments, I can logout the application and when I return everything looks > Ok. I have checked the table and all looks Ok. for ERAttachment and > ErAttachmentData, but if I restart the application I get the following error > message: > > > *Error:*java.lang.IllegalStateException: The object with globalID > _EOIntegralKeyGlobalID[ERAttachment (java.lang.Integer)5] 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).*Reason:*The object with globalID > _EOIntegralKeyGlobalID[ERAttachment (java.lang.Integer)5] 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). > > I changed the relationship to ERDatabaseAttachment and now I can restart > the applicaiton aand I get the correct attachment data, but in the tutorial > said that the relationship should be made to ERAttachment, what I'm missing? > > Regards, > > Daniel. > > > > > _______________________________________________ > Do not post admin requests to the list. They will be ignored. > Webobjects-dev mailing list ([email protected]) > Help/Unsubscribe/Update your Subscription: > > http://lists.apple.com/mailman/options/webobjects-dev/simon%40potwells.co.uk > > This email sent to [email protected] >
_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list ([email protected]) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to [email protected]
