# |
Oct 22nd 2009, 05:02 |
dakota |
EPIC FAIL |
# |
Oct 22nd 2009, 05:02 |
dakota |
I believe this is the right time for: |
# |
Oct 22nd 2009, 05:02 |
dogmatic69 |
lol |
# |
Oct 22nd 2009, 05:02 |
NoReGreT |
yeah... :S |
# |
Oct 22nd 2009, 05:02 |
dogmatic69 |
do you have it in the controller? |
# |
Oct 22nd 2009, 05:01 |
dogmatic69 |
yip |
# |
Oct 22nd 2009, 05:01 |
dakota |
yeah |
# |
Oct 22nd 2009, 05:01 |
NoReGreT |
ok, I think I did something very wrong, beforeSave should be in the model, right ? |
# |
Oct 22nd 2009, 05:00 |
dogmatic69 |
i think so |
# |
Oct 22nd 2009, 05:00 |
NoReGreT |
should i call it ? |
# |
Oct 22nd 2009, 05:00 |
dogmatic69 |
parent::beforeSave() |
# |
Oct 22nd 2009, 05:00 |
NoReGreT |
records are added fine |
# |
Oct 22nd 2009, 05:00 |
NoReGreT |
it is saving fine |
# |
Oct 22nd 2009, 04:59 |
dogmatic69 |
->save( $data, array( 'validate' => false |
# |
Oct 22nd 2009, 04:59 |
NoReGreT |
dogmatic69: no errors, it is saving fine (ok, now i know what you meant by saving :) |
# |
Oct 22nd 2009, 04:59 |
dakota |
Are there validation errors? |
# |
Oct 22nd 2009, 04:59 |
dakota |
do you call $this->Model->save() in your controller? |
# |
Oct 22nd 2009, 04:59 |
NoReGreT |
dakota: i guess so |
# |
Oct 22nd 2009, 04:59 |
dakota |
ah, so its not calling beforeSave |
# |
Oct 22nd 2009, 04:58 |
dogmatic69 |
well it need to be able to save before it will use beforeSave... are there validation errors or something |
# |
Oct 22nd 2009, 04:58 |
NoReGreT |
but it's not |
# |
Oct 22nd 2009, 04:58 |
NoReGreT |
dakota: i meant it should print/debug the array then die |
# |
Oct 22nd 2009, 04:58 |
NoReGreT |
dogmatic69: saving what ? i'm ust debug()ing to see the array |
# |
Oct 22nd 2009, 04:57 |
dakota |
cake caching is so awesome |
# |
Oct 22nd 2009, 04:57 |
dakota |
NoReGreT: Why would it print die? it should just die |
# |
Oct 22nd 2009, 04:57 |
dogmatic69 |
NoReGreT: is it saving? |
# |
Oct 22nd 2009, 04:56 |
dogmatic69 |
anyone got a good reason why ->read() is not ->read( $id, $conditions ); instead of ->read( $conditions, $id ); ? |
# |
Oct 22nd 2009, 04:56 |
NoReGreT |
i'm putting a debug($this->data); die; in beforeSave(), shouldn't it just print the die ? it's not printing nore dying... |
# |
Oct 22nd 2009, 04:53 |
dogmatic69 |
you can do that or you can replace a normal ->find() with ->paginate() |
# |
Oct 22nd 2009, 04:52 |
Mike_MnD |
dogmatic69: do you refer to Custom Query Pagination |
# |
Oct 22nd 2009, 04:51 |
dogmatic69 |
Mike_MnD: yes... check the book |
# |
Oct 22nd 2009, 04:49 |
Mike_MnD |
Is there a way to filter with pagination (just like the sort but filtring the data) |
# |
Oct 22nd 2009, 04:47 |
dogmatic69 |
only saw the it was for 1.3 now |
# |
Oct 22nd 2009, 04:46 |
dogmatic69 |
Phally: i see... i was reading a post on 1.3 "Using behaviors that do not exist, now triggers a cakeError making missing behaviors easier to find and fix." |
# |
Oct 22nd 2009, 04:46 |
dakota |
works |
# |
Oct 22nd 2009, 04:46 |
dakota |
cache::delete('.', 'app') |
# |
Oct 22nd 2009, 04:46 |
NoReGreT |
debug($this->data) * |
# |
Oct 22nd 2009, 04:46 |
dakota |
but, its good |
# |
Oct 22nd 2009, 04:46 |
dakota |
cache::clear() doesn't work well for multiple namespace cache::configs |
# |
Oct 22nd 2009, 04:46 |
NoReGreT |
i'm putting a debug(); die; in beforeSave(), shouldn't it just print the die ? it's not printing nore dying... |
# |
Oct 22nd 2009, 04:46 |
Phally |
dakota: oh i see, perhaps Cache::clear() could do it too, can't remember :p |