Log message #1110683

# At Username Text
# Oct 22nd 2009, 16:14 dogmatic69 brookshire: yes you can check anythign and no it does not check model->data
# Oct 22nd 2009, 16:14 arz or code that should go to vendors
# Oct 22nd 2009, 16:14 brookshire and it checks model->data
# Oct 22nd 2009, 16:13 arz this model , against basic table driven models more looks like component for me
# Oct 22nd 2009, 16:13 Ceeram brookshire: what is your problem then?
# Oct 22nd 2009, 16:13 brookshire you can set whatever validation rules you want
# Oct 22nd 2009, 16:13 brookshire all i am saying is that cake doesn't care what the structure is
# Oct 22nd 2009, 16:12 dogmatic69 Ceeram: dam you beat me
# Oct 22nd 2009, 16:12 dogmatic69 $this->set( $whatever ); $this->validates()
# Oct 22nd 2009, 16:12 Ceeram save will set that, otherwise do $this->set($data_to_validate)
# Oct 22nd 2009, 16:12 brookshire $this->model->data
# Oct 22nd 2009, 16:11 brookshire sorry..
# Oct 22nd 2009, 16:11 dogmatic69 brookshire: you are prety wrong
# Oct 22nd 2009, 16:11 Horror have a good nite
# Oct 22nd 2009, 16:11 Horror thanks for the help fellas
# Oct 22nd 2009, 16:11 Ceeram brookshire: it validates the model data
# Oct 22nd 2009, 16:11 brookshire but i'm pretty certain that $this->validates only checks $this->data
# Oct 22nd 2009, 16:11 Ceeram or pull data from webservice?
# Oct 22nd 2009, 16:11 dogmatic69 maybe with $this->validates()
# Oct 22nd 2009, 16:11 Ceeram you are saving to the webservice
# Oct 22nd 2009, 16:10 dogmatic69 brookshire: where you saving to?
# Oct 22nd 2009, 16:10 brookshire Ceeram: it should work on save if you setup the validation rules.. i've done it before
# Oct 22nd 2009, 16:10 jbcrawford is it possible to query a model with a condition for a specific item in a habtm relationship?
# Oct 22nd 2009, 16:09 Ceeram brookshire: the data you get from the webservice is more like a find, that wont be validated like on a save
# Oct 22nd 2009, 16:09 brookshire i would do the validation in the controller: and that is incorect
# Oct 22nd 2009, 16:09 brookshire but i'm thinking that is specific to the model yeah
# Oct 22nd 2009, 16:08 brookshire of course you still need a view
# Oct 22nd 2009, 16:08 brookshire i would do the validation in the controller
# Oct 22nd 2009, 16:08 dogmatic69 alan|macbook: later
# Oct 22nd 2009, 16:08 arz sorry
# Oct 22nd 2009, 16:08 arz brookshire, the model itself
# Oct 22nd 2009, 16:08 dogmatic69 jessica-m: just delete them manualy first then
# Oct 22nd 2009, 16:08 alan|macbook bye all
# Oct 22nd 2009, 16:07 alan|macbook enough for tonight. thanks again dogmatic69.
# Oct 22nd 2009, 16:06 brookshire only works against $this->data
# Oct 22nd 2009, 16:06 brookshire i believe $validates ignores any db structure
# Oct 22nd 2009, 16:06 arz brookshire, not that, i'm trying to validate the input from controller (user submitted data) ... well ... if i move all the model code to function can that help?
# Oct 22nd 2009, 16:06 brookshire i would pull the data from the webservice, then format it like cakephp likes it in the array, save to $this->data, and finally run $this->model->validates()
# Oct 22nd 2009, 16:05 jessica-m it never deletes them, so its just ending up with tons of the same group per user every time the record is saved
# Oct 22nd 2009, 16:04 jessica-m INSERT INTO `auth_groups_users` (`user_id`,`group_id`) VALUES (170,'5')
# Oct 22nd 2009, 16:04 jessica-m its a HABTM rel, its just generating the insert