I have used this group and the Cake manual and they have been
invaluable resources, but then I hit an odd snag.

Here is the query that is output:
SELECT `Tag`.`id`, `Tag`.`tagName` FROM `downloader_tags` AS `Tag`
JOIN `downloader_files_tags` ON (`downloader_files_tags`.`file_id` = 1
AND `downloader_files_tags`.`tag_id` = `Tag`.`id`) WHERE 1 = 1;

It says that 'downloader_files_tags' table does not exist, but it
should not be looking for a '_files_tags' table. Just a '_tags' table.

Here is files_controller:
<pre>
class FilesController extends AppController {
 var $name = 'Files';
 var $uses = array('File','Tag');

 function display_new() {
   $this->set('test',$this->File->findAll());

   $this->render('home');
 }
}
</pre>

Here is file (model):
<pre>
class File extends AppModel {
  var $name = 'File';
  var $hasAndBelongsToMany = 'Tag';
}
</pre>


And tag (model):
<pre>
class Tag extends AppModel {
  var $name = 'Tag';
  var $hasAndBelongsToMany = 'File';
}
</pre>


--~--~---------~--~----~------------~-------~--~----~
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