I really appreciate all of the feedback. I must admit, there are
advantages and disadvantages to both methods. I want to keep it
positive so I won't discuss the disadvantages from my perspective, but
the things I look for.

Zonium, thanks for the information on the foreign key caveat... _id...
that will come in handy to know. I will try to submit a documentation
bug (unless you have already) to the cakephp documentation team.

AD7six. I am not certain what you mean as to your statement of a
"general misundertanding of what an object is or how they are
implemented in cake." I mean I understand the statement, but the
example you are providing isn't clear as to the point you are trying
to make. Not to me anyway. Not in the context of what we have been
working on. If your example was:

$this->Car->id = 'mine';
$keys = $this->Car->Owner->Key->findAll("where `car_id` = 'mine'");

Then I could see the context. But from my perspective, I am not trying
to say here is my letter_section now give me all the sections
available and expecting cake to understand what I am asking for.

abba your solution is interesting to me. I must confess, I am not
excited about adding the extra controller unless cake absolutely needs
this in order to get this to work correctly. I have a feeling I will
be testing your implementation before long however.

Since I am jack of all trades (DB & Code) and master of neither, I
like to keep things simple. I like the idea of having different models
for each of the letter_content sections, but my thought is it would be
easier to follow the approach zonium has presented. It keeps all of
the code in fewer locations and specific to the model/controller
combinations. As it stands, the data pulled from the letter_content
model by the relationship in the letter model requires the letter
controller to  ALWAYS be filtered as dictated by the application
specifications. (i.e Openings will always be "where `letter_section` =
'Opening'", etc.) In other words, I will never want endings to be
available as openings. So there is no concern about needing to have
access to the letter_content through the letter model by some other
method.

Having said that, I tried to replicate zoniums work, and I get some of
the same inconsistencies I was seeing before. However, the openings
are showing up just fine now... but the middle and ending both have
middle content in the drop down now. So filtering is making it
through, but just not as expected. When I set the debug to 3 in the
core.php, I am able to use the queries directly in MySQL and they pull
the filtered data as expected, so I am not sure what the disconnect
is. I am using version 1.1.18.5850 in the case you are using different
versions.

It is still odd to me when setting a filter in the model the
scaffolding totally disregards it. It would seem the data model should
be reflected in the controller as the model specifies. Or am I
confused as to how MVC functions? If so, I would love for someone to
explain it to me.

So Abba, I will try your methodology next. I am not giving up on
zoniums solution, I just want to experiment with the various solutions
to see which of them feel right to me and make the most sense.

Thanks for all of the feed back. Keep it coming!

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to