• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: D2W attachment location and delete
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: D2W attachment location and delete


  • Subject: Re: D2W attachment location and delete
  • From: Theodore Petrosky <email@hidden>
  • Date: Fri, 15 Aug 2014 13:45:47 -0400


On Aug 15, 2014, at 1:15 PM, Ramsey Gurley <email@hidden> wrote:


On Aug 15, 2014, at 10:01 AM, Theodore Petrosky <email@hidden> wrote:

Ok, I finally figured out how to add an attachment to a relation in D2W. However, is it expected behavior that when you delete an asset, it only deletes the ‘link’ to the asset, but not the asset itself.

I’m assuming you have a ->> b -> erattachment

If you have the a->>b relationship “owns destination” then the related eo will be deleted when it is removed from the relationship. You can then have that eo cascade delete the attachment eo.

Yes, this is what I have.   a ->> b -> erattachment

 Article >> pdfs > attachement

 In Article/pdfs basic property the Delete Rule = cascade    and on the advanced tab   Owns Destination.

No joy. The uploaded file remains after it is removed. For this project, I can see that having a bunch of orphans won’t kill me. 

Ted



Meaning I upload a pdf. later I delete it from the relation. the asset shows one less item in its list, however the pdf is still in the file/database. 

It is effectively orphaned. 

Also, when I click to edit the attachment, there is a ‘remove’ button associated with the file. If I click it, the app crashes with: 

Error:java.lang.IllegalArgumentException: This form is missing a 'enctype=multipart/form-data' attribute. It is required for WOFileUpload to work.
Reason:This form is missing a 'enctype=multipart/form-data' attribute. It is required for WOFileUpload to work.


Ted

I have a custom assignment to handle most of my form encoding cases.

https://github.com/nullterminated/ponder/blob/master/ERR2d2w/Sources/er/r2d2w/assignments/R2DDefaultAttachmentAssignment.java#L47

That probably won’t work if you have set up a nested inline edit page or something though.


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >D2W attachment location and delete (From: Theodore Petrosky <email@hidden>)
 >Re: D2W attachment location and delete (From: Ramsey Gurley <email@hidden>)

  • Prev by Date: Re: D2W attachment location and delete
  • Next by Date: possible issue with WOLips and new Ubuntu version
  • Previous by thread: Re: D2W attachment location and delete
  • Next by thread: Re: D2W attachment location and delete
  • Index(es):
    • Date
    • Thread