Monday, May 11, 2015

Re: Fixtures for Models that use another Model's table

Nevermind - I think I found the problem. I forgot to reference the proper namespace because both models are in 2 separate plugins.

On Monday, May 11, 2015 at 8:46:49 PM UTC-7, HVan wrote:
I have a Model, say ClientsTable, and another Model called UsersTable.

ClientsTable also uses the users table, so I set useTable = users

Everything works fine, until I'm creating tests. One of the tests says the clients table is not found. So if I create a clients fixture and import the users table, there's no way I can re-use the users table or it says the users table already exists.

What should I do besides generating another table for clients that is identical to users?

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.

No comments: