Dynamically altering external names for Entities
Mark Morris <[email protected]> Fri, 09 May 2003 12:15:32 -0500
| Newsgroups | gmane.comp.web.webobjects.eof |
|---|---|
| Message-ID | <[email protected]> |
Hello! I've been poking around the docs and haven't found a good solution to something I think should be quite do-able. I'm working with a schema where there are many multiple instances of the same tables, just with different names and data. You typically only work with one "set" of these tables at a time, so: I want to define just one set of entities in my EOModel, the use some WOSession variable to determine which actual external table names get built in the SQL. It's simple to access any EOModels, spin through and setExternalName on the appropriate entities, but I get the impression that's a global operation, affecting every WOSession, so I'd rather find a solution that affects the SQL generation directly. I was also looking at a delegate on the EOAdaptorChannel, but among other things I wasn't clear on how to make sure the delegate get set on *all* of the adaptor channels the app might create. After that I might be able to get hold of the EOSQLExpression, but I'm not yet sure how to alter that and continue the processing. Thanks for any help! :-) -- Mark