Hi Markus, I’d create a new relationship for the entity - using ERAttachment.
Then create a dynamically derived property that, for existing entities, uses the old stored binary file. However, on editing, the new system of attachment can be used and this then displaces the old type. I might even consider having a single direct action that, on running, iterates through all existing objects with old style attachments and inserts them as a ERAttachment instead. After you’ve run this, you could delete the old relationship / storage mechanism. I don’t think you can retrofit ERAttachment as it supports multiple different types. Mark > On 4 Oct 2014, at 12:12, Markus Ruggiero <mailingli...@kataputt.com> wrote: > > On 27.09.2014, at 16:11, Markus Ruggiero <mailingli...@kataputt.com > <mailto:mailingli...@kataputt.com>> wrote: > >> I am converting a legacy D2W application to Modern style. In the old >> application the create page for a given entity was frozen and then hand >> edited. The application implements something similar to ERAttachment and in >> the frozen edit page there is a plain WOFileUpload button. All the files go >> into the same directory (unlike with ERAttachment, where the files are >> stored in a multi-level subdirectory structure). >> >> I want to do as much as possible without custom components (at least no page >> level components). I can easily do the Create/Edit/List page configuration >> for the given entity, but I am struggling with the file upload. I don't >> think I can use ERAttachment, or can I? My data model is Product <-->> >> Attachment (yes, the name already maches). Attachment has just a to-one >> relationship to product and a file name attribute (path is "hard coded" via >> properties file. It is is certainly possible to extend the existing >> Attachment entity with more fields, but how wold I handle the differing way >> of storing the attached files? This is a legacy application where I cannot >> just simply alter the file system layout. And there are already several >> 1000's of attachments. >> > > No takers? I have been playing with and studying the source of ERAttachment > and things (including ERMD2WEditAttachment) but I cannot make sense of these > things (yet). This is a legacy application that needs to be brought over to > the modern D2W world but the data structures and file names are a given and > cannot be changed (and don't fit with what ERAttachment needs) > > Please help me, I don't see things anymore > Thanks a lot > ---markus--- > > _______________________________________________ > 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/mark%40wardle.org > > This email sent to m...@wardle.org
_______________________________________________ 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