It sounds like you are trying to create a HABTM join table, if so, I
recommend reading the manual on how to do this through CakePHP.  There
should be no need to actually create a model for this table, and cake will
handle all of the relationships for you =)

http://book.cakephp.org/view/83/hasAndBelongsToMany-HABTM

<http://book.cakephp.org/view/83/hasAndBelongsToMany-HABTM>

On Fri, Nov 27, 2009 at 6:40 AM, John Andersen <j.andersen...@gmail.com>wrote:

> Which table does CakePHP say it can't find? Is it "invoices_statuses"
> or "invoice_statusses"?
> Show the error and maybe also the model definition!
> Enjoy,
>    John
>
>
> On Nov 25, 3:12 pm, Kerr <hayl...@gmail.com> wrote:
> > Hi folks, I'm using CakePHP for a new project, and I am having a great
> > time not having to do so much CRUD work!  That said, I want to set up
> > a simple $scaffold based model, and I'm having trouble reconciling a
> > table to a model.  My application handles client billing for a
> > business, and I have a model named Invoice, with all the convention
> > based names for tables, columns, controllers, etc.  Invoices must
> > carry a status, and here is where I'm having some trouble.  Here is
> > the layout of the assets in question:
> >
> > Table name: invoicestatuses (OR invoice_statuses)
> > Model name: InvoiceStatus
> > Model file name: invoice_status.php
> > Controller name: InvoiceStatusesController
> > Controller file name: invoicestatuses_controller.php
> >
> > CakePHP is able to find my model and controller, but it chokes on
> > locating the table.  If I use the former table name, CakePHP throws an
> > error saying it can't find the latter, and vice versa.  I've tried
> > hardcoding either table in my model using the $table variable, and
> > even $useTable (not sure if that would generally work anyway), but
> > CakePHP always comes back telling me it can't find the table for my
> > model.
> >
> > What am I doing wrong here?
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> 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<cake-php%2bunsubscr...@googlegroups.com>For
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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