Modifying EOModels at runtime (was Re: Multithreading EOAccess)
Jonathan Rochkind <[email protected]>
| Newsgroups | gmane.comp.web.webobjects.eof |
|---|---|
| Message-ID | <[email protected]> |
At 09:37 PM 11/20/2002 +0100, Pierre Bernard wrote: >As for the the relationship thing. I never actually had to do it. Though >of it once and in the end found a better way to do it. If you're talking about making aliases of relationships to allow multiple aliased tables in SQL, to allow proper qualifiers in certain situations with to-many relationships... can you share what your situation was and what your better way to do it is? I'm trying to figure out how I'm going to deal with this, without the current solution (gotten from the list) of adding relationships on the fly. [My particular situation could be explained as: Department to-many to Person. Look for Departments that have Persons in them who live in zip code X AND have Persons in them who live in zip code Y. No individual person needs to (or can!) live in both zip codes. We just need a list of Departments which include at least one person in zip code X, AND at least one person in zip code Y. It's not really Departments, Persons, and zip codes. I just substitute those for the actual business objects for explanatory purposes. I was wrong before where I said it was a certain kind of OR condition and a to-many relationship which required the multiple aliasing of a single table. In my case, it's actually a certain kind of AND. Fetching more than you really need into memory and then applying further qualifiers in memory to narrow it down, that would be one solution. But in my case there are very many EOs involved, and this is really unsatisfactory. Especially when I can easily write the SQL to do what I want---it's just a question of getting EOF to generate that SQL from a qualifier.] >Oh well, I guess being aware of the risks already helps. In the end a >model group for each EOF stack might be the best way to go. One just has >to hope that none of Apple's code relies on always using the default model >group. > >Pierre. > >-- >Got time to spare? Why don't you visit my web site? >http://homepage.mac.com/I_love_my