Has anyone been able to successfully implement ERAttachment with StorageType = 
“db”? The following is my question/difficulty:

I am still wrestling with ERAttachment ‘magic’..!! I can finally ‘easily’ 
upload attachment files and populate <ERAttachment/ERAttachmentData> database 
entities <i.e: with ERDatabaseAttachment.STORAGE_TYPE =“db” >, but I can’t 
figure/find out the magic that’s required to set the Owning EO’s 
<MasterObject’s> Attribute Value for the to-one ‘destination’ RelationshipKey. 
That is: when and how is the JOIN attribute VALUE SET by the attachment 
<ERAttachment>, so that when the owning EO (masterObject) is retrieved the 
appropriate attachment is located and rendered?

        RelationshipKey myAttachment ====>>  MasterObject {attachmentID} 
————>ERAttachment {id}

                such that: MasterObject.myAttachment() = stored_attachment

In short, the correct corresponding attachment is retrieved ONLY if:   
                MasterObject. attachmentID() = ERAttachment.id()

But can’t see when/where MasterObject. attachmentID is set!

Can’t find it in documentation or Javadoc (api: Project Wonder 7.0.0-SNAPSHOT)

Any help will be appreciated.. Thank you!

PS: The attachments are created and saved in the DB but the attachmentID is NOT 
set in the owning/masterObject !!!

Kwasi

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
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

Reply via email to