I found an article online about lazyloading of models based on their need
rather than all at once.
I've tried making a custom method of binding models on the fly but that has
many problems as well. I have roughly 80 tables that all relate to the user
some how and they all inter relate to eacho
I have a users model and a photos model,
Class users{
Var belongsto=array(
'Photos'
}
You get the idea,
When I run a $this->Some
Model>find('all',array('contain'=>array('User','User.Photo')))
It breaks this up into 2 sql statements so even with a limited amount of 20
resul
I am dealing with a site that is probably larger than had originally been
thought of when the designers made CakePHP. I have already invested 4
months in development and now that I have a user base it bogs down a lot
when about 5 users get on at the same time. I'm hoping to have thousands of
user
Ya.. totally, let's see some code. It sounds like you're using some out of
the box code and never took out $this->Auth->login($this->data);
-Original Message-
From: cake-php@googlegroups.com [mailto:cake-...@googlegroups.com] On Behalf
Of cricket
Sent: Friday, April 23, 2010 6:16 PM
T
Mootools and many other javascript frameworks have a function called
serialize which packages up a form for transport. And the very nature of
https is designed exactly for the reason you described. There really aren't
any work arounds for encryption that are secure since https has a 3rd party
to
I think you need a contain to include the third table.
$this->ATable->find('all',
array('contain'=>array('BTable','BTable.CTable')));
That's just off the hip
Alan
-Original Message-
From: cake-php@googlegroups.com [mailto:cake-...@googlegroups.com] On Behalf
Of andy
Sent: Thursday, Apri
In your practice_items_controller.php your pr should not have the lowercase
and underscored array element.
Check your form or wherever you're assigning this array and your pr should
look like
Array
(
[PracticeItem] => Array
(
[name] => Test
[description] => Te
I've never coded in 1.1, However, depending on what your project's
intentions are, I wouldn't go with 1.3 until it is out of beta.
Depending on how much time you have to play with it. Just keep a new copy
and just start taking care of the bugs generated from 1.1 to 1.2 as they pop
up.
-Or
in AppController:
$this->Auth->logoutRedirect = array('controller' => ..., 'action'
=> ...));
On Mar 29, 6:36 pm, "Alan Asher" wrote:
> Please read carefully, My issue is not with the default behavior of when a
> person is not logged in and tries to reac
Please read carefully, My issue is not with the default behavior of when a
person is not logged in and tries to reach a page that is auth protected.
I am having an issue because after the person hits logout I think that the
auth component should forget the page I was just on, so when I log in
I've seen something like this before, for some odd reason instead of
erroring before it submits the sql, it will try and use an array as the
value, and the first value of that array is an "L".
Do a pr before the saveField command and see what could possibly have a
string that starts with L
Also t
I had the same issue, it's a security feature for sure...
It will also happen if you follow a link from a cached page
in your app/config/core.php
Change your config:write to Configure::write('Security.level', 'medium');
And that should do the trick. I don't remember where I found the answer to
;favorites',
'foreignKey' =>
'business_id',
'associationForeignKey' =>
'user_id'
)
);
}
models/category.php
class Cate
I might need to see your models but you probably need to do something like
this.
$this->Business->find('all,array('conditions'=>array('Business.city'=>$city)
,'contain'=>array('Category')));
The contain clause will make sure to limit your search results to have only
categories (as well as the bus
Change your
$this->set('fields',$this->Event->Fields->findAllBySeason('2010'));
To say
$this->set('fields',$this->Event->Fields->find('list',array('conditions'=>ar
ray('season'=>'2010';
Basically findby is a normal sql query and find('list') is a special query
that returns an array of key v
I've noticed a similar issue at times. When I have debug turned on and
there's a pr() somewhere it will break my css. Basically any output sent
before the view renders will break the css.
Take a look at the source that your view renders and see if you have
anything before the tag.
-Origina
My first instinct is to embed skype or something like that.
-Original Message-
From: cake-php@googlegroups.com [mailto:cake-...@googlegroups.com] On Behalf
Of Abraham Boray
Sent: Wednesday, March 10, 2010 7:40 AM
To: CakePHP
Subject: Video Conférence within Cake !!
Anyone of u guys , know
The first thing that comes to my mind is using smarty. You can direct it to
use a database field instead of a file. In which case, you'll have a new
set of issues to deal with which are related to passing the $html object
into the template.
Also, if you trust the code then you can do a few other
There is definitely a learning curve. I would say about 2 weeks worth of a
learning curve to go from a skilled oop php developer to understanding the
ins and outs of cakephp.
If you've been working on the same project for 6 years, there's a good
chance you have a lot of custom solutions to smal
Has anyone run across a function similar to bindModel and unbindModel which
to me would be called updateModel()
Basically, I've run across several situations where I just need to update
the model's limit or ordering and finding that I have to use the bindModel
and repeat everything that was in
I am assuming that you're not storing any of this information in the
database, otherwise it would be easy to call the page in a separate window.
So if that's the case, store the results in the session.
Also, you can designate the print css with @media print inside your css
http://www.w3schools.c
I am looking for the flowchart diagram that explains when everything is
called for cake.
I remember seeing it once when I was first researching cakephp so I may just
be thinking of a flow chart of what MVC is.
Does any one have or know of this graphic?
Check out the new CakePHP Questions
Of course, it's the syntax again..
$myScroll->User->unbindModel('hasMany',array('Photo'));
Should read
$myScroll->User->unbindModel(array('hasMany'=>array('Photo')));
_
From: cake-php@googlegroups.co
Here's the code I used to hack my way through this.
$myScroll=new Scroll($scroll_id);
$myScroll->User->bindModel(
array('hasMany' => array(
'Photo' => array(
'className' => 'Photo',
'foreignKey'
class Tag extends AppModel
{
var $name = 'Tag';
}
Simple syntax error...
You need to have the "var" in front of the $name.
-Original Message-
From: cake-php@googlegroups.com [mailto:cake-...@googlegroups.com] On Behalf
Of Jim Rootham
Sent: Thursday, December 10, 2009 12:30 PM
To:
hp+ow...@googlegroups.com
[mailto:cake-php+ow...@googlegroups.com] On Behalf Of Alan Asher
Sent: Tuesday, December 08, 2009 1:07 PM
To: CakePHP
Subject: unbindModel issues
I have a users model and a photos model.
The model for users is set up that it "hasMany" Photos and &qu
I have a users model and a photos model.
The model for users is set up that it "hasMany" Photos and "belongsTo"
Photo
During this code.
$this->Profile->Behaviors->attach('Containable');
$this->Profile->recursive=2;
$this->Profile->User->Photo->recursive=0;
I've been scouring the web for a while trying to figure this out. My brain
is fried, so I need some help.
I have a model called Containers, a model called Assets and HABTM table
called AssetsContainer.
So a container can have many assets.
The first question I have is when I'm doing thi
28 matches
Mail list logo