Re: hasAndBelongsToMany issue

2008-11-17 Thread omar.laverde
Hi, to everyone i solve out my problem, if any one has a similar problem the way to solve it´s to add in the model de variable: var $displayField, and write de fild name that you want to display like this; var $displayField = 'login'; Hope it help´s On 16 nov, 19:56, omar.laverde [EMAIL

hasAndBelongsToMany issue

2008-11-16 Thread omar.laverde
Hi to every one, i am using the hasAndBelongsToMany (cake 1.2) using this tables: profiles, roles, profiles_roles. the way how it works it`s that the profile has many roles and the profiles_roles is the middle table, the problem that i have is that in the edit.ctp is displaying the id of the

hasAndBelongsToMany issue

2008-04-09 Thread inma
I have an User class and a PermissionGroup class. User has defined a hasAndBelongsToMany relation with PermissionGroup. If into database exists one user with two permission grups assigned, when I run this code: $userA = $this-User-findAll($sort, $limit, $page); //gets all the User records and

hasAndBelongsToMany issue

2008-01-22 Thread Eemerge
Hello, I have 3 tables: 1. posts 2. categories 3. post_2_cat I am trying to use hasAndBelongsToMany to fetch a post and its associated categories (from post_2_cat) The only problem i encountered so far is with table fields names. Initially i had post_id and category_id in the posts and

Re: hasAndBelongsToMany issue

2008-01-22 Thread b logica
On Jan 22, 2008 7:13 AM, Eemerge [EMAIL PROTECTED] wrote: Hello, I have 3 tables: 1. posts 2. categories 3. post_2_cat I am trying to use hasAndBelongsToMany to fetch a post and its associated categories (from post_2_cat) The only problem i encountered so far is with table fields

Re: hasAndBelongsToMany issue

2008-01-22 Thread Renan Gonçalves
Maybe do you have to set $primaryKey on your controller. Like: class Posts extends AppModel { ... var $primaryKey = 'post_id'; ... } On Jan 22, 2008 10:13 AM, Eemerge [EMAIL PROTECTED] wrote: Hello, I have 3 tables: 1. posts 2. categories 3. post_2_cat I am trying to use

hasAndBelongsToMany issue

2006-07-10 Thread kiniu
Hi all, Today I've found that in my application when I try to edit one of my models after save result is not that I expect. My model has 4 hasAndBelongsToMany associations. When my model belongs to all of them and while editing it I remove one of the associations to other model there is a big

Re: hasAndBelongsToMany issue

2006-07-10 Thread Larry E. Masters aka PhpNut
Open a ticket on the trac site-- /*** @author Larry E. Masters* @var string $userName* @param string $realName* @returns string aka PhpNut* @accesspublic*/ On 7/10/06, kiniu [EMAIL PROTECTED] wrote: Hi all,Today I've found that in my application when I try to edit one of mymodels after save result