Re: Help wanted: instantiating tables from templates
Ricardo Strausz <[email protected]>
| Newsgroups | gmane.comp.web.webobjects.eof |
|---|---|
| Message-ID | <[email protected]> |
The only thing that comes to my mind right now, is to go deep down in the EO framework; use raw SQL to create the tables and relationships and then (may be before commiting the transaction) manipulate your EOModel to update it. You will have to be awere of make them both to be on sinc... This solution will nead a deep knowledge of EOF at all levels, and of EOModels. However, if for each user you will have the same amount of tables and all of them are "of the same kind" (with the same atributes) an easier solution is to have a global table and simply separate the scope for each user via some atribute (say, an integer "user"). Suerte! Let me (us) know if you succed, and how. On lunes, febr 10, 2003, at 13:52 America/Mexico_City, Michael Gersten wrote: > I want to instantiate new tables/entities from template tables. I > don't know how. > > Specifically, I want to have an entity that looks like an accounting > general ledger table. Right now I'm looking at a pair of tables, a > standard master/detail listing. One table is a list of the individual > lines affecting the accounts, with a foreign transaction PK; the other > contains the transactions. > > What I want to do, however, is to have all of the information for > different accounts located in different database tables. > > And, since any transaction will reference transactions in another > table, that means that I'm going to need to identify by (foreign) PK > both the table and the transaction in that table (To indicate both a > debit from one account, and a credit to the other). > > I know that there was prior discussion where someone said they were > going to write up generalized "encoding table in PK" code for use, but > I never saw any "It's done, get it here" message. > > So, two (or three) questions: > 1. Was any generalized "encode table in PK" support code done and > released? If not, can someone give me a URL for the "Here's the > details on how to do it, but you'll need to customize it for your > application" page, > > 2. Given an entity that lists "transaction #X has entries in these > tables" (one to many), and a template for the detail tables, how do I > instantiate that detail table for Postage, Bank, Rent, > PayrollLiabilities, etc., and add new tables at runtime (including > creating new tables at the user's request), > > 3. The goal of this is, that by seperating out the individual accounts > into seperate tables, a single table could be used as an account by > different sets of books -- say an individual with two schedule C > businesses, and a personal set of books, will have three different > sets of books that are accessing the same bank account (just as one > example -- two that have owner's draws going out as an expense, and > the third that has it as an assent account.) Can anyone think of a > better idea for organizing this? > > -- > I am a Mac OS X-Cocoa/WOF/EOF developer as well as a C++/Java/General > OO developer/Rdbm developer, and I'm available for hire. Please > contact me at michael-job-sig12-15-2002 @ stb.nccom.com if interested. > > -- Help rate sound codecs! Visit http://www.soundexpert.info > _______________________________________________ > EOF mailing list > [email protected] > http://www.omnigroup.com/mailman/listinfo/eof > Dino http://homepage.mac.com/strausz