Re: can you restrict the table fields cake recursively retrieves?

2006-08-18 Thread Chris Cassell
I think that what you want is the fields element in the Album model's association array for Image, something like: $hasMany = array ('Image' = array ('fields' = array ('Image.name','Image.id'))) I don't remember exactly if you need the 'Image.' part or not... You can dynamically change this

Re: HABTM involving 3 tables

2006-06-21 Thread Chris Cassell
Write a method in your model that calls $this-query (), then you can call it from your controller $this-Model-method (). --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send

Re: How optimize application?

2006-06-13 Thread Chris Cassell
And you are right with bindModel function. When I removed hasAndBelongsToMany association from one of my model and binded it in action function del() $model-del() function didn't remove associations from DB. I've been in a similar situation. I'm building an app that has around 30 models and

Re: using more than one model in a add_new view

2006-05-01 Thread Chris Cassell
$this-ModelA-ModelB-save (array ('ModelB' = $modelb2)); $this-ModelA-ModelB-save (array ('ModelB' = $modelb3)); ..This code first saves the data of $modelb2 and then replaces it with the data of $modelb3. How do I save $modelb3 to a new 'ModelB'? Add $this-ModelA-ModelB-create(); between

Re: Session value is favicon.ico Why?

2006-04-25 Thread Chris Cassell
I had the same problem. Make sure the link to favicon.ico is root- relative (/favicon.ico). Otherwise the server's looking for / controller/action/favicon.ico and the broken link gets captured as the current page. Same thing for your css and js.

Re: bindModel() and saving hasAndBelongsToMany

2006-04-13 Thread Chris Cassell
I figured this one out after looking at Ticket #518 in trac: https://trac.cakephp.org/ticket/518 Thought it might help someone else out. Associations set with bindModel are removed after a query on the primary model. For instance, if you have a model Event and you bind the model Contact with a

Re: bindModel() and saving hasAndBelongsToMany

2006-04-12 Thread Chris Cassell
Try adding the other model in your HABTM to the uses array and add that bindModel call under your current one and see if that helps. No luck. I didn't have that relationship in the other model before I removed the static associations anyway. In my experience, there's really no need to have