Page 384 of 211,271, showing 20 records out of 4,225,406 total, starting on record 7,661, ending on 7,680
# | Username | Text | |
---|---|---|---|
# | Aug 9th 2008, 17:31 | primeminister_ | jaredhoyt: yeah |
# | Aug 9th 2008, 17:31 | jaredhoyt | if you're validating both models at the same time, it would just be something like $this->Modelx->set($this->data); $this->Modely->set($this->data); if($this->Modelx->validates() andand $this->Modely->validates()) { } |
# | Aug 9th 2008, 17:31 | jezek | so i have to load the model somewhere else? |
# | Aug 9th 2008, 17:32 | primeminister_ | jaredhoyt: ah of course |
# | Aug 9th 2008, 17:32 | primeminister_ | jaredhoyt: and then do a save without validation |
# | Aug 9th 2008, 17:32 | jaredhoyt | right |
# | Aug 9th 2008, 17:32 | Matt1 | jezek: you are calling it from a controller, right ? |
# | Aug 9th 2008, 17:32 | primeminister_ | jaredhoyt: thnx! |
# | Aug 9th 2008, 17:33 | jaredhoyt | np |
# | Aug 9th 2008, 17:34 | jezek | no |
# | Aug 9th 2008, 17:34 | jezek | i guess i could |
# | Aug 9th 2008, 17:34 | jaredhoyt | jezek: are you trying to access a model that is included in the $uses of the component's calling controller? |
# | Aug 9th 2008, 17:34 | jezek | no |
# | Aug 9th 2008, 17:34 | jezek | he just asked that |
# | Aug 9th 2008, 17:34 | jezek | i'd rather not have to |
# | Aug 9th 2008, 17:35 | jaredhoyt | jezek: have you read the last section of this : http://book.cakephp.org/view/62/components#mvc-class-access-within-components-65 |
# | Aug 9th 2008, 17:36 | jezek | yeah |
# | Aug 9th 2008, 17:36 | jezek | do i have to put $userInstance = ClassRegistry::init('User'); within every function? |
# | Aug 9th 2008, 17:36 | jaredhoyt | no, you could do it in the startup() or initialize() |
# | Aug 9th 2008, 17:36 | jaredhoyt | just have to set it to a class var instead of function var |