Edward Haber wrote:
> 
> First of all, had I known you were a Zend engineer I probably wouldn't  
> have opened my big mouth. I'm new to the list. :-) But since it's  
> already open, i'll just offer a few points of view from my perspective.
> 
> On Sep 22, 2008, at 12:55 PM, Bill Karwin wrote:
>> Edward Haber wrote:
>>>
>>> Another problem with the proposed solution is that it only makes one
>>> module's models path active at a time. I think the ideal when working
>>> with multiple modules is to have the option of using model code from
>>> more than one module models directory at a time, especially in cases
>>> of interdependency.
>>
>> No, that's not ideal, that's actually what I was recommending to  
>> _prevent_.
> 
> I see your point that having all the models directories of all modules  
> in the include path leads to namespace collision in a modular  
> framework like Joomla. I was under the impression you were making a  
> modular application where the code is grouped by functionality rather  
> than a third-party-capable modular framework.
> 


hmmm yes your right this is a really good question, lets say i have a module
called "users", if the module "images" wants to make a list of users, they
won't be able to use the "users"-model because the bootstrap did not load
it, the bootstrap only loaded the "images"-model ..? but do i really need a
simple users list in my "images"-controller ... if i do a query i would
probably use left join, for example:

table images:
id
image-path
user-id

table users:
id
name

if i now show the last 5 images that were published, and i want to add the
users name under it, i would make a query SELECT images.path, users.name
FROM images LEFT JOIN users LIMIT 5, so i wouldnt need to access the users
model

phew was hard to explain this with my bad english ;)
-- 
View this message in context: 
http://www.nabble.com/multiple-models-with-same-name-%28m1-models-pages.php-and-m2-models-pages.php%29-tp19607614p19630559.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to