From: Andrew H. <hur...@ll...> - 2003-11-12 18:19:45
|
Hello there, Finally back to work with OpenInteract, I've got a question. I'm working on a document management system, and the documents will be broken up into pages and paragraphs. The general idea is: Document 1->N DocumentPage 1->N DocumentParagraph. Relevant table structure: Document has a document_id DocumentPage has a document_page_id, and document_id DocumentParagraph has a document_paragraph_id and a document_page_id What I would like to do, is represent this link somehow in the spops.perl, but I'm not exactly sure how. I want to be able to be using a document object, and get the list of documentPage objects associated with it by just doing: @doc_pages = @{ $document->document_pages }; I've looked into has_a, and links_to, but they don't seem to do exactly what I need. Specifically it looks as if I need to keep the id of the DocumentPage object that is 'had' by the Document object in the Document table. Is there a way to specify 'linked_by' relationships? In writing this I've realized that this could be a huge performance hit for big documents with lots of pages and paragraphs (the one that I'm designing this for has about 99 pages in Word). I might just have to write a few functions to fetch this information manually and only set it if needed... Any pointers? Thanks. -Andrew |