Re: Data validation always return true

2009-04-09 Thread Rhee
, 3:52 pm, brian wrote: > On Thu, Apr 9, 2009 at 8:06 AM, Rhee wrote: > > > Next question, why is it now working? What did $this->Model->set() do? > > Can you gimme short explanation? > > It sets the Primary Key for the model and $Model->data values. > > http:

Re: Data validation always return true

2009-04-09 Thread Rhee
; > > $this->User->validates($this->data); // always return true > > > $this->User->save($this->data); // always return true, and try to save > > > You say it always returns true, but are you testing that in an if block? > > > On Wed, Apr 8, 200

Re: Data validation always return true

2009-04-09 Thread Rhee
> $this->User->validates($this->data); // always return true > > $this->User->save($this->data); // always return true, and try to save > > You say it always returns true, but are you testing that in an if block? > > On Wed, Apr 8, 2009 at 9:59 AM, Rhee wrote: &

Data validation always return true

2009-04-08 Thread Rhee
Hi, the data validation in my User Model always return true. Can anybody tell me why? In Model: var $validate = array ( 'login' => array ( 'notempty' => array ( 'rule' => array('custom', VALID_NOT_EMPTY),

Re: table naming convention question

2009-04-08 Thread Rhee
Yes it works like that. Just give it a try.. ;-) On Apr 8, 3:41 pm, scott wrote: > I am new to cake and understand about plural names for tables. > > My question is for names that end in "y" like library > plural-"libraries", is it possible to name tables this way? If so, > how? > > Thanks in ad

Re: Save doesn't work with Postgres

2007-12-04 Thread Rhee
Thanks for the answer ... Then I'd rather use SQL INSERT / UPDATE statement. I just don't want to change anything on the Cake source ... ;-) On Dec 1, 9:02 pm, "Adrian Maier" <[EMAIL PROTECTED]> wrote: > On Nov 30, 2007 12:01 PM, Rhee <[EMAIL PROTECTED]>

Re: Save doesn't work with Postgres

2007-11-30 Thread Rhee
No one has ever this problem? On Nov 29, 12:17 pm, Rhee <[EMAIL PROTECTED]> wrote: > Does anybody have problem to use Save function with Postgres? > Everytime I call $this->Model->save($this->data) I get the following > notice messages (repeated 4 times): > > No

Re: Am I trying to do the impossible (or impractical)?

2007-11-29 Thread Rhee
I would put a bool flag in addresses table. Something like `defaultAddress` as bool, where set to true when default and false on the other case. Then you could put WHERE statement into your find function. On Nov 29, 11:50 am, "J.B." <[EMAIL PROTECTED]> wrote: > zonium: yes, you're absolutely righ

Save doesn't work with Postgres

2007-11-29 Thread Rhee
Does anybody have problem to use Save function with Postgres? Everytime I call $this->Model->save($this->data) I get the following notice messages (repeated 4 times): Notice: Undefined index: name in /var/www/htdocs/sid/cake/libs/model/ dbo/dbo_postgres.php on line 350 and then: Warning: Cannot

checkSession doesn't work well

2007-11-01 Thread Rhee
Hi, I use checkSession() in AppController to check if the user logged in or not and I also put $beforeFilter in AppController. Basically it does work. But as soon as I need this function for almost any views in UserController, it doesn't redirect me to login page. The code in AppController: