Just a thought - do you have the saveAssociated set to Atomic? and does 
the DB support this?
I have not done a lot of testing on this, but i had to change the table 
defaults to innoDB to support transactions, mySQL defaults to MyISAM.

On 6/7/2012 1:10 AM, Michael Gaiser [via CakePHP] wrote:
> So I have a form in my domains/add view. All the domain input fields
> save their data just fine when the form is submitted. The problem is
> that there is another field (Characters.0.character_id) that is to
> save its data to an hasMany associated join model (CharactersDomain).
> In the CharactersDomain model I have added a validation rule to the
> "character_id" which I have set to always fail for testing purposes.
> When I use saveAll to save the Domain data and the associated
> character_id in the CharactersDomain the Domain record is saved to the
> database but the CharactersDomain record is not (because the
> validation failed).
>
> So I have 2 questions:
>
> 1: I thought saveAll was only to save the data if all the validations
> passed. Why was the Domain record saved if the CharactersDomain record
> failed its validation?
> 2: When the CharactersDomain fails, I want it to display its error
> message on the Characters.0.character_id input. Why did it not show
> the error?
>
> -- 
> Our newest site for the community: CakePHP Video Tutorials 
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and 
> help others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> [hidden email] </user/SendEmail.jtp?type=node&node=5708611&i=0> For 
> more options, visit this group at http://groups.google.com/group/cake-php
>
>
> ------------------------------------------------------------------------
> If you reply to this email, your message will be added to the 
> discussion below:
> http://cakephp.1045679.n5.nabble.com/Associative-model-validation-fails-but-does-not-report-tp5708611.html
>  
>
> To start a new topic under CakePHP, email 
> [email protected]
> To unsubscribe from CakePHP, click here 
> <http://cakephp.1045679.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=1255722&code=YmlsbC5zdG9sdHpAYm9vc3RlcndlYnNvbHV0aW9ucy5jb218MTI1NTcyMnwtNTU0NTk2MTUy>.
> NAML 
> <http://cakephp.1045679.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>  
>


--
View this message in context: 
http://cakephp.1045679.n5.nabble.com/Associative-model-validation-fails-but-does-not-report-tp5708611p5708630.html
Sent from the CakePHP mailing list archive at Nabble.com.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to