# |
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() |
# |
Sep 13th 2009, 14:07 |
ionas82 |
okay and I should initialize a $db model (DboSource) |
# |
Sep 13th 2009, 14:06 |
markstory |
$db->commit() etc. |
# |
Sep 13th 2009, 14:06 |
markstory |
$db->begin() |
# |
Sep 13th 2009, 14:06 |
ionas82 |
yes markstory I got that |
# |
Sep 13th 2009, 14:06 |
markstory |
you are using the wrong table types. |
# |
Sep 13th 2009, 14:06 |
ionas82 |
but how should I call transactions |
# |
Sep 13th 2009, 14:06 |
markstory |
and everything to do with your database |
# |
Sep 13th 2009, 14:06 |
ionas82 |
thats fine |
# |
Sep 13th 2009, 14:06 |
markstory |
it has nothing to do with cake. |
# |
Sep 13th 2009, 14:06 |
ionas82 |
on innodb? |
# |
Sep 13th 2009, 14:06 |
markstory |
use innodb |
# |
Sep 13th 2009, 14:05 |
ionas82 |
using saveAll ? atomic: If true (default), will attempt to save all records in a single transaction. |