Re: HABTM isUnique validation throws error on join model

2011-04-13 Thread francky06l
Well, if you do not use innoDb, atomic is useless anyway ... 'validate' => 'only' should however make it ... Wwhat cake version are you using ? On Apr 14, 2:48 am, euromark wrote: > 'atomic' => false > and > validate => only > can result in unexpected results^^ > I had to find out the hard way >

Re: HABTM isUnique validation throws error on join model

2011-04-13 Thread euromark
'atomic' => false and validate => only can result in unexpected results^^ I had to find out the hard way you cannot simply use if() in this case you need some hack like I came up with if (CommonComponent::logicalAnd($this->Model->saveAll(..., array('validate'=>'only' :) On 14 Apr., 02:28, f

Re: HABTM isUnique validation throws error on join model

2011-04-13 Thread francky06l
Do you use saveAll on innoDb tables ? If not, actually set option 'atomic' => false. Try first save with options validate => only and a second saveAll with validate false. On Apr 13, 12:06 am, Jeff wrote: > I've got an odd problem.  I have tables/models names and projects with > join table names

HABTM isUnique validation throws error on join model

2011-04-12 Thread Jeff
I've got an odd problem. I have tables/models names and projects with join table names_projects. I have an isUnique rule on the name field in the names table so that I don't have repeat entries. When I perform my saveAll with a new name and the validation in place I get the error: Notice (8): U