Hi Mark,
Thank's for answer.
I've look for a "with" key in all my associations and found none...
I've seen line 657, so it's very strange?!!
Maybe another Core update...
BR
On 2 sep, 16:43, mark_story <[EMAIL PROTECTED]> wrote:
> On Sep 2, 4:42 am, avairet <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hi everybody,
>
> > Since Trac moderators want always "Test Case" when submitting tickets,
> > I stop my bug effort and I report issues here. I hope some Unit Tests
> > gurus will report it in Trac correctly...
>
> > So, I've updated Cake Core from nightly builds SVN yesterday and
> > discover an update wich break my app. In fact it seems to be line 670
> > of cake/libs/model/model.php:
>
> > "if (!ClassRegistry::isKeySet($plugin . $joinClass) && !
> > App::import('Model', $plugin . $joinClass)) "
>
> > This line break some of my associations, database tables and class
> > models name wich are CamelCased or irregular plural forms.
>
> > For example, I have a model called "MyPractice" (table called
> > my_practices) wich is binded by HABTM with MyPracticeType (table
> > called my_practice_types).
> > The link table is calling "my_practices_has_my_practice_types". I know
> > this not Cake compliant, but I've correctly set the associations in
> > each models:
>
> > /* /app/model/my_practice.php */
> > public $hasAndBelongsToMany = array(
> > 'MyPracticeType' => array('className' =>
> > 'MyPracticeType',
> > 'joinTable' =>
> > 'my_practices_has_my_practice_types',
> > 'foreignKey' =>
> > 'my_practice_id',
> > 'associationForeignKey' =>
> > 'my_practice_type_id',
> > 'unique' => true,
> > 'conditions' => '',
> > 'fields' => '',
> > 'order' => '',
> > 'limit' => '',
> > 'offset' => '',
> > 'finderQuery' => '',
> > 'deleteQuery' => '',
> > 'insertQuery' => ''
> > )
>
> > /* /app/model/my_practice_type.php */
>
> > public $hasAndBelongsToMany = array(
> > 'MyPractice' => array('className' => 'MyPractice',
> > 'joinTable' =>
> > 'my_practices_has_my_practice_types',
> > 'foreignKey' =>
> > 'my_practice_type_id',
> > 'associationForeignKey' =>
> > 'my_practice_id',
> > 'unique' => true,
> > 'conditions' => '',
> > 'fields' => '',
> > 'order' => '',
> > 'limit' => '',
> > 'offset' => '',
> > 'finderQuery' => '',
> > 'deleteQuery' => '',
> > 'insertQuery' => ''
> > )
> > );
>
> > When I launch any page of my app, this is the error message:
> > "Error: Database table my_practices_has_my_practice_types for model
> > MyPracticesHasMyPracticeType was not found."
>
> > Why Cake is searching for a model that represents the HABTM?
>
> > If I delete the "!ClassRegistry::isKeySet($plugin . $joinClass) && "
> > clause on line 670, all works fine...
>
> > Any ideas to explain that issue are welcome!
>
> > BR
>
> > Avairet
>
> Do you have a 'with' key defined? I don't see it in the model pastes
> above. But you only go into the block you mentioned if the 'with' key
> is specified. See line 657.
>
> -Mark
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---