# |
Sep 13th 2009, 14:26 |
ionas82 |
markstory, any tips on saveAll and validation, seems not to tigger form->errors() ? |
# |
Sep 13th 2009, 14:25 |
ionas82 |
works for sure |
# |
Sep 13th 2009, 14:25 |
ionas82 |
http://bin.cakephp.org/view/586626198 |
# |
Sep 13th 2009, 14:24 |
ionas82 |
jway, sure? |
# |
Sep 13th 2009, 14:24 |
jway |
ionas82, well you can use both but it makes no difference |
# |
Sep 13th 2009, 14:23 |
ionas82 |
~bin |
# |
Sep 13th 2009, 14:23 |
ionas82 |
y |
# |
Sep 13th 2009, 14:23 |
ionas82 |
jway those variables take array usualle |
# |
Sep 13th 2009, 14:22 |
ionas82 |
http://book.cakephp.org/img/typical-cake-request.gif |
# |
Sep 13th 2009, 14:22 |
jway |
but it does not get user information when getting an article |
# |
Sep 13th 2009, 14:22 |
ionas82 |
before calling the action |
# |
Sep 13th 2009, 14:22 |
jway |
so in Comment I used $belongsTo = 'User' |
# |
Sep 13th 2009, 14:22 |
ionas82 |
NoReGreT, in your controller |
# |
Sep 13th 2009, 14:22 |
jway |
but a comment has a user_id which I need to lookup to get the username |
# |
Sep 13th 2009, 14:21 |
jway |
I have an article model with $hasMany = 'Comment' and this works fine and retrieves all comments associated with the current article |
# |
Sep 13th 2009, 14:21 |
NoReGreT |
when does beforeFilter() occur ? |
# |
Sep 13th 2009, 14:18 |
ionas82 |
ah so sweet |
# |
Sep 13th 2009, 14:18 |
ionas82 |
ah so simple |
# |
Sep 13th 2009, 14:18 |
ionas82 |
now lets find out how to specify fieldList |
# |
Sep 13th 2009, 14:18 |
ionas82 |
hm |
# |
Sep 13th 2009, 14:16 |
markstory |
) |
# |
Sep 13th 2009, 14:16 |
ionas82 |
thank you markstory, half the codesize (just by searching for "transaction" on the book) and working transactions :))) |
# |
Sep 13th 2009, 14:14 |
hyther |
s |
# |
Sep 13th 2009, 14:14 |
hyther |
translate behavior doesn't work with something like thi |
# |
Sep 13th 2009, 14:14 |
hyther |
http://bin.cakephp.org/view/880928755 |
# |
Sep 13th 2009, 14:12 |
savant1 |
~tell hyther about bin |
# |
Sep 13th 2009, 14:12 |
hyther |
just making this in app_model give me problem using i18n |
# |
Sep 13th 2009, 14:12 |
hyther |
} |
# |
Sep 13th 2009, 14:12 |
hyther |
parent::find( $type, $options = array() ); |
# |
Sep 13th 2009, 14:12 |
hyther |
function find($type, $options = array() ) { |
# |
Sep 13th 2009, 14:11 |
hyther |
I got a problem with I18n and custom find() in app_model |
# |
Sep 13th 2009, 14:10 |
markstory |
but you still need to use the correct tables. |
# |
Sep 13th 2009, 14:10 |
markstory |
saveAll uses transactions yes. |
# |
Sep 13th 2009, 14:10 |
ionas82 |
that would reduce code size ;) |
# |
Sep 13th 2009, 14:09 |
ionas82 |
markstory, I could save multiple records with saveAll that has internal transactions as far as I got it right |
# |
Sep 13th 2009, 14:08 |
ionas82 |
if I do I will remember that |
# |
Sep 13th 2009, 14:08 |
ionas82 |
for now I do not require them often |
# |
Sep 13th 2009, 14:08 |
markstory |
transactions that is. |
# |
Sep 13th 2009, 14:08 |
markstory |
I think matt curry made a behavior for this as well. |
# |
Sep 13th 2009, 14:08 |
ionas82 |
great thank you |
# |
Sep 13th 2009, 14:07 |
markstory |
$db = $this->getDataSource() |