Thank you Simon,

Now I have the relationship set to the specific table, and works but I'm going 
to set back to ERAttachment to get the select and as you said.

Saludos,

Daniel.




On 02/04/2011, at 03:44, Simon wrote:

> 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 <mej...@evol-tech.com> 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      (Webobjects-dev@lists.apple.com)
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/webobjects-dev/simon%40potwells.co.uk
> 
> This email sent to si...@potwells.co.uk
> 

 _______________________________________________
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:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to