# |
Oct 22nd 2009, 10:39 |
nicoleG |
) |
# |
Oct 22nd 2009, 10:39 |
Horror |
nicoleG: all sexy now - works! thanks for the help man |
# |
Oct 22nd 2009, 10:39 |
nicoleG |
let me know what happens |
# |
Oct 22nd 2009, 10:39 |
nicoleG |
var $primaryKey = 'subId' in the model it's a primary key and add it as a foreign key in the related model |
# |
Oct 22nd 2009, 10:39 |
Horror |
which you initially told me |
# |
Oct 22nd 2009, 10:38 |
Horror |
that might be it |
# |
Oct 22nd 2009, 10:38 |
Horror |
nope. no pk delcared in the model template |
# |
Oct 22nd 2009, 10:36 |
nicoleG |
pk* |
# |
Oct 22nd 2009, 10:36 |
nicoleG |
have you declared your primary key in the model it's a pl for and the same field as a foreign key in the model it relates to? |
# |
Oct 22nd 2009, 10:35 |
Horror |
nicoleG: might be something with read() |
# |
Oct 22nd 2009, 10:34 |
nicoleG |
i'm still a new baker :) |
# |
Oct 22nd 2009, 10:34 |
nicoleG |
1 sec, looking around |
# |
Oct 22nd 2009, 10:33 |
Horror |
nicoleG: yeah. I want to change the default from what cakes uses |
# |
Oct 22nd 2009, 10:32 |
nicoleG |
or just for that particular model? |
# |
Oct 22nd 2009, 10:32 |
nicoleG |
which is what you want, right Horror? |
# |
Oct 22nd 2009, 10:32 |
nicoleG |
i think there's a way to change the fields cake uses by default for models |
# |
Oct 22nd 2009, 10:30 |
alan|macbook |
it's been 3 days since i'm googling around and experimenting with no luck and i would really appreicate some help. I have a tree model and i want to do something like this : http://crepitus.com/misc/ext/tree.html How the heck do i do that with cakePHP??? |
# |
Oct 22nd 2009, 10:29 |
nicoleG |
i would think cake would know to use it for that particular model in all crud operations |
# |
Oct 22nd 2009, 10:29 |
Horror |
nicoleG: in the mysql query it is using model.id ='' - I want it to compare it with model.subId instaed |
# |
Oct 22nd 2009, 10:28 |
alan|macbook |
hey all |
# |
Oct 22nd 2009, 10:28 |
Horror |
nicoleG: how do i go about telling edit() to use subId once i declare that primaryKey? |
# |
Oct 22nd 2009, 10:28 |
t0nic |
i *hate* that!!! ('fraid it will pop up again...) |
# |
Oct 22nd 2009, 10:27 |
t0nic |
BlackIce: gd it, turned debug on and off and it went away |
# |
Oct 22nd 2009, 10:27 |
nicoleG |
) |
# |
Oct 22nd 2009, 10:26 |
Ceeram |
markstory: any ideas what could be causing the wrong data format on the test |
# |
Oct 22nd 2009, 10:26 |
Horror |
nicoleG: i'll give that a try. Thanks! |
# |
Oct 22nd 2009, 10:26 |
nicoleG |
i think that will work |
# |
Oct 22nd 2009, 10:26 |
Horror |
t0nic: Yeah. I'm talking about the controller edit(0 function |
# |
Oct 22nd 2009, 10:26 |
nicoleG |
var $primaryKey = 'subId' |
# |
Oct 22nd 2009, 10:26 |
nicoleG |
horror, you can add the primary key to the model |
# |
Oct 22nd 2009, 10:25 |
nicoleG |
is it possible to paginate $this->Model->query() results and if so, how? |
# |
Oct 22nd 2009, 10:25 |
t0nic |
Horror: I don't quite know how but it would be done in the controller, not edit.ctp |
# |
Oct 22nd 2009, 10:24 |
t0nic |
thanks, I'll try |
# |
Oct 22nd 2009, 10:24 |
t0nic |
hmm... I turned them off!! |
# |
Oct 22nd 2009, 10:24 |
BlackIce |
t0nic: with or without debug settings? |
# |
Oct 22nd 2009, 10:23 |
Horror |
hey fellas - in the default edit.ctp generated by bake console. how do I modify the default query so takes table.subId as the primary key instead of table.id? |
# |
Oct 22nd 2009, 10:21 |
t0nic |
I guess I'll just have to tell myself about patience |
# |
Oct 22nd 2009, 10:21 |
t0nic |
not even you can help me :( |
# |
Oct 22nd 2009, 10:20 |
t0nic |
ok cakebot |
# |
Oct 22nd 2009, 10:20 |
t0nic |
~tell t0nic about patience |
# |
Oct 22nd 2009, 10:18 |
t0nic |
I added a couple fields to the users table but username and password are unchanged |