# |
Sep 22nd 2011, 15:20 |
TheWarden |
as soon as I remove the $hasMany within my Donglekey class the issue is gone. What simple thing am I doing wrong here. |
# |
Sep 22nd 2011, 15:18 |
TheWarden |
CakePHP appears to be using the wrong data source. Its not using dsi as I'm telling it to in the model and instead is using the $default database connection. So therefore it tries to find a web_dongle_keys_hardwares database table instead of dongle_keys_hardwares. As well its not using my model class either... sigh |
# |
Sep 22nd 2011, 15:14 |
Know1edge |
anyone know of an api/service that will let you enter addresses and it will find an optimized route for you for each waypointâ?¦ google maps api limits you to 26 stops |
# |
Sep 22nd 2011, 15:13 |
EtRiGaN |
check class name? |
# |
Sep 22nd 2011, 15:11 |
TheWarden |
I get "Missing Database Table Error: Database table web_dongle_keys_hardwares for model DonglekeysHardware was not found." |
# |
Sep 22nd 2011, 15:11 |
pur3forlyphe |
fixed btw |
# |
Sep 22nd 2011, 15:10 |
TheWarden |
I have it defined var $userDbConfig = 'dsi'; and it works fine in the donglekey model. |
# |
Sep 22nd 2011, 15:10 |
TheWarden |
I'm confused why its not using the dsi database connection |
# |
Sep 22nd 2011, 15:09 |
diverdude |
anyone? |
# |
Sep 22nd 2011, 15:06 |
TheWarden |
here is my database.php, and the two models, http://pastebin.com/aZtMvB2B. |
# |
Sep 22nd 2011, 15:06 |
pur3forlyphe |
hi all, trying to set a var $currentUser with $this->set(compact('currentUser', 'user')); though it keeps setting the var as $user still |
# |
Sep 22nd 2011, 15:05 |
Rozik |
TehTreag: this is awesome:-) thx! exactly what i needed |
# |
Sep 22nd 2011, 15:05 |
TheWarden |
I have a database table called dongle_keys_hardwares and I'm trying to link two models with hasMany however when I do this cake is looking for web_dongle_keys_hardwares. However there is no web_dongle_keys_hardwares its just dongle_keys_hardwares. my dbConfig is set with no prefix but its still using web_. Let me pastebin my two models and database.php |
# |
Sep 22nd 2011, 15:01 |
TheWarden |
Hi |
# |
Sep 22nd 2011, 15:01 |
Rozik |
TehTreag: thx |
# |
Sep 22nd 2011, 15:00 |
TehTreag |
~tell Rozik about google cakephp pseudocoder book download |
# |
Sep 22nd 2011, 14:59 |
Rozik |
EtRiGaN: thx for the hint:-) i am noob but will try to figure it out |
# |
Sep 22nd 2011, 14:59 |
TehTreag |
I generally follow pseudocoder's recommendation... AppModel::$recursive=-1; and use containable. |
# |
Sep 22nd 2011, 14:58 |
EtRiGaN |
set recursiveness to 0 and add your needed relations field/conditions manually? |
# |
Sep 22nd 2011, 14:57 |
Rozik |
hi guys, is there a way to set recursiveness only for certain fields of a model? when i do a find i want some related data but not the whole database:-) |
# |
Sep 22nd 2011, 14:56 |
EtRiGaN |
tnx, ill do that |
# |
Sep 22nd 2011, 14:56 |
EtRiGaN |
ok, i use to like automagic stuff's |
# |
Sep 22nd 2011, 14:55 |
jgonca |
Etrigan: Try this $this->Form->input('Credit.payment_operator_id', array('options' => $payment_operators)), like TehTreag said |
# |
Sep 22nd 2011, 14:55 |
TehTreag |
EtRiGaN: Specify the 'options' for the input. No guessing. |
# |
Sep 22nd 2011, 14:54 |
EtRiGaN |
any idea? |
# |
Sep 22nd 2011, 14:51 |
EtRiGaN |
*combinations |
# |
Sep 22nd 2011, 14:49 |
EtRiGaN |
so i think that i did not give the apropiate name to the list, but ive tried all convinations |
# |
Sep 22nd 2011, 14:49 |
EtRiGaN |
did i misspell the name of the options list? this problem is happening only with double word model :$ |
# |
Sep 22nd 2011, 14:48 |
Ghost_Trolley |
cake is not picking up my add function, whats some common mistakes that break the link? |
# |
Sep 22nd 2011, 14:46 |
EtRiGaN |
but its not detecting the options right |
# |
Sep 22nd 2011, 14:46 |
EtRiGaN |
and in the view echo $this->Form->input('Credit.payment_operator_id'); |
# |
Sep 22nd 2011, 14:46 |
EtRiGaN |
i get the list of referenced values: $this->set('payment_operators', $this->Credit->PaymentOperator->find('list')); |
# |
Sep 22nd 2011, 14:39 |
jgonca |
TehTreag: thx :) |
# |
Sep 22nd 2011, 14:38 |
EtRiGaN |
when loading a referenced input field in a form, you have to get the list from the referenced model right |
# |
Sep 22nd 2011, 14:37 |
TehTreag |
~tell jgonca about google cakephp multiple pagination same page |
# |
Sep 22nd 2011, 14:37 |
TehTreag |
jgonca: There's an article somewhere... |
# |
Sep 22nd 2011, 14:27 |
jgonca |
another way is to override the <a> link that paginator generates and make an ajax request that will update only the block I want. |
# |
Sep 22nd 2011, 14:26 |
jgonca |
to avoid this, I thought of using ajax, but does Paginator supports two different configurations in the same view? |
# |
Sep 22nd 2011, 14:25 |
jgonca |
I have two pagination block in the same page. Since they use almost the same model, if I click a link to sort one of the blocks, the other block will be sorted the same way. |
# |
Sep 22nd 2011, 14:17 |
Hyra |
Yup. |
# |
Sep 22nd 2011, 14:16 |
TehTreag |
Hyra: More of reading, but not understanding. |