Currently you can have models/ subfolders for controllers and for functions in controllers. If two functions need the same model file, it should go in the same models/controller/ subfolder or at the top level (visible to all controllers).
There is a proposal on the table (with a patch by Mariano) to allow granular conditions models in which you can decide which model file is needed by which controller or function. Is had been table because of lack of interest. I am happy to revive it if there is push. massimo On Friday, 25 May 2012 10:49:51 UTC-5, David McKeone wrote: > > Hi Massimo, > > "You probably do not need 100 models defined for each request." and "Make > sure you turn migrations off and bytecode compile your apps." > > No, I certainly don't need all 100 at all times. That was really just a > test to see where the boundaries were going to be. It likely wasn't the > optimal configuration (migrations were off, wasn't byte-compiled), but it > did highlight that as the app grows that's an area I have to watch for and > one that will affect the user experience. Once I saw that a boundary > existed I found Bruno's model-less design and that brought things back to > great performance levels. So I think that design will fit my needs > performance wise. > > I'll investigate the conditional model system, but my understanding of > that was that you would be restricted to specific controllers. As in, I > can't use a single table (model) across multiple controllers. Would that be > true? > > -David >