Ok, I finally solved the problem, and I feel like an idiot. I had my
model files named plural instead of singular, so that's why there
weren't getting loaded. ie: app/models/posts.php instead of app/models/
post.php. Argh. I thought I checked that first but probably got caught
up in other stuff and missed it.

Thanks for all your help though. If someone else has a similar error,
first thing is CHECK THE FILENAMES (and also class names for that
matter, though that wasn't my problem).

Exciting, now I can finally start doing some cool stuff with this
framework. I guess the good news is I know my way around the file
structure pretty good now.

On Dec 29, 8:58 am, George <geo...@hakumei.net> wrote:
> I've been using the release candidates, and just upgraded to stable
> 1.2, hoping that would fix the issue but it hasn't. I've tried using
> MySQL now instead of MS SQL Server just to see if that had an effect
> (final will have to be MS though) but I'm still getting the same
> problem. If you're getting the correct functionality doing exactly the
> same thing, then I guess for some reason my model files aren't getting
> loaded at all. Not using a hacked core or anything, just everything
> straight from the repository. Weird. I guess the search continues. Any
> other ideas would be appreciated if someone stumbles upon this thread.
>
> On Dec 25, 10:14 pm, "Dr. Loboto" <drlob...@gmail.com> wrote:
>
> > George, what Cake version do you use?
>
> > I tried your "posts" test with table replacing (to "users" one in my
> > case) and it was fine. Debug outputed Post::$useTable = "users" etc.
> > Test with $useTable = false also was fine.
>
> > Do you use hacked core or some automagic components/AppModel/
> > AppController or any other part of you code can take effect?
>
> > BTW, Cake 1.2 finally released. No more beta on production!
>
> > On Dec 23, 11:39 pm, George <geo...@hakumei.net> wrote:
>
> > > Thanks for the suggestion Dr. Loboto. That doesn't seem to do it for
> > > me either though. I'm still getting the stupid complaint that the
> > > table doesn't exist. If I add a "reports" table to the database, then
> > > it works fine, but obviously I don't want to have to add tables to the
> > > database I have no intention of using just to satisfy cake's need for
> > > finding one. Frustrating.
>
> > > If you have a moment, would you mind running a 
> > > Debugger:dump($this->Utility); in your controller and letting me know 
> > > what prints? As you
>
> > > can see from my post, I'm getting information that looks as if my
> > > Model isn't being loaded at all, and cake is defaulting to automagic
> > > functionality. If yours outputs AppModel::$useTable = false or
> > > Utility::$useTable = false, then obviously something is wrong with my
> > > configuration or setup, and not the actual model.
>
> > > Thanks for your help.
>
> > > On Dec 23, 10:46 am, "Dr. Loboto" <drlob...@gmail.com> wrote:
>
> > > > Checked my models without tables, all of them work fine and differ
> > > > from yours only in one param. All of them have $name :
>
> > > > <?php
> > > > class Utility extends AppModel {
> > > >     public $name = "Utility";
> > > >     public $useTable = false;}
>
> > > > ?>
>
> > > > Try add $name, maybe it is just strange bug? (and clear cache too)
>
> > > > On Dec 23, 1:26 am, George <geo...@hakumei.net> wrote:
>
> > > > > Thanks for the suggestion, but unfortunately it didn't seem to do
> > > > > anything, and I still am getting a complaint that the reports table
> > > > > for the Report model was not found. Here is the exact code in the
> > > > > model:
>
> > > > > <?php
> > > > > class Report extends AppModel {
> > > > >         var $useTable = false;
>
> > > > >         public function getYearlySalesStats($year) {
> > > > >                 return $this->query("EXECUTE report_SalesStats $year, 
> > > > > NULL");
> > > > >         }}
>
> > > > > ?>
>
> > > > > Annoying. The manual seems to say pretty cut and dry that by setting
> > > > > the $useTable member equal to false, cake will ignore the table
> > > > > requirement.
>
> > > > > For more info, I'm running cake on fedora/apache, and using MSSQL
> > > > > Server as my database.
>
> > > > > On Dec 19, 12:59 am, Kappa <andrea.cappalu...@gmail.com> wrote:
>
> > > > > > Have you tried to reset the cache? Sometimes i have the same
> > > > > > problem, and i solve it deleting the cache in /app/tmp/cache
>
> > > > > > bye,
> > > > > >    Andrea
>
> > > > > > On Dec 18, 6:55 pm,George<geo...@hakumei.net> wrote:
>
> > > > > > > Hello.
>
> > > > > > > I'm pretty new to cake and am working on creating a reporting 
> > > > > > > intranet
> > > > > > > application. Basically I aggregate a bunch of data through views 
> > > > > > > and
> > > > > > > stored procedures on the database, and would like to build a 
> > > > > > > "Report"
> > > > > > > model that will just have a bunch of custom functions to run the
> > > > > > > various stored procedures. As the functions would be returning
> > > > > > > datasets in different forms (based on the various reports), I 
> > > > > > > wouldn't
> > > > > > > want this to actually be associated with any one table (the data 
> > > > > > > is
> > > > > > > aggregated from many tables).
>
> > > > > > > I've read here that you can set the $useTable attribute in a 
> > > > > > > model to
> > > > > > > false and then cake won't try to locate the model in the database.
> > > > > > > After setting $useTable to both false and null, I still have cake
> > > > > > > complaining that it can't find the table reports in the database 
> > > > > > > when
> > > > > > > I call any action on the ReportsController.
>
> > > > > > > Is there something else I need to set/do? Or should I not be even
> > > > > > > using a model at all in this case, and query directly from the
> > > > > > > controller? To me, it seemed like encapsulating all database 
> > > > > > > calls in
> > > > > > > models would be the best solution, but does anyone else with more 
> > > > > > > cake
> > > > > > > experience have an opinion?
>
> > > > > > > Thanks.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to