the File object should have an array of document ID's. Your FileDAO would create the associations during a save (create/update). You can split that out into separate functions if you wish, but they should be private and only called from within the DAO.
Helps? -Dave >>> [EMAIL PROTECTED] 02/13/06 2:11 PM >>> So, I have a document section on an intranet (documents & forms). For each form you upload X number of files (client specifications). I am working on my first OOP project and I am feeling a bit overwhelmed. A little advice here would be appreciated. I have a Document object (gateway, BO, DAO, Bean) and I have File objects (gateway, DAO, Bean). The sytem is being built so that one file could potentially be linked to more than one document. This is modeled in the join table: File_item_jn (id, file_id, foreign_table, foreign_key). Right now, my FileDAO has the standard CRUD operations that act on the file bean, but I have also thrown in a few methods for Assocations: CreateAssociation(FileBean, ForeignTable, foreignKey) DeleteAssociation(FileBean, ForeignTable, foreignKey) DeleteAssociations(ForeignTable, foreignKey) Is this a bad idea? I feel like these are File-Data-related items, but am new, and not sure if DAO should have anything outside the CRUD methods? Not sure how I feel about this, any advice, suggestions would be super appreciated. ...................... Ben Nadel Web Developer Nylon Technology 6 West 14th Street New York, NY 10011 212.691.1134 212.691.3477 fax www.nylontechnology.com Programming is my "money" job. My real passion is eating. ---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to cfcdev@cfczone.org with the words 'unsubscribe cfcdev' as the subject of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com). An archive of the CFCDev list is available at www.mail-archive.com/cfcdev@cfczone.org ----------------------------------------- CONFIDENTIALITY NOTICE: This email and any attachments may contain confidential information that is protected by law and is for the sole use of the individuals or entities to which it is addressed. If you are not the intended recipient, please notify the sender by replying to this email and destroying all copies of the communication and attachments. Further use, disclosure, copying, distribution of, or reliance upon the contents of this email and attachments is strictly prohibited. To contact Albany Medical Center, or for a copy of our privacy practices, please visit us on the Internet at www.amc.edu. ---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to cfcdev@cfczone.org with the words 'unsubscribe cfcdev' as the subject of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com). An archive of the CFCDev list is available at www.mail-archive.com/cfcdev@cfczone.org