# |
Sep 12th 2009, 14:01 |
AD7six |
or just use query |
# |
Sep 12th 2009, 14:01 |
AD7six |
jaysonsantos: to treat it as a model, you need to give it a single field primary key |
# |
Sep 12th 2009, 14:01 |
jaysonsantos |
AD7six 2, they are a multiple pk without identity |
# |
Sep 12th 2009, 14:00 |
AD7six |
jaysonsantos: how many fields are in your db table |
# |
Sep 12th 2009, 14:00 |
jaysonsantos |
Hello people, I'm trying to delete all elements from a table with two conditions however that table don't have a PK and cake do a mess. How can I get that working ? |
# |
Sep 12th 2009, 13:58 |
AD7six |
!log |
# |
Sep 12th 2009, 13:58 |
AD7six |
!seen savant |
# |
Sep 12th 2009, 13:36 |
pearcec |
sky_l3ppard: I thought you can call models with out a model class defined and it makes it up on the fly. So I think it technically worked correctly. |
# |
Sep 12th 2009, 13:35 |
dogmatic69 |
cool tx |
# |
Sep 12th 2009, 13:34 |
AD7six |
u? |
# |
Sep 12th 2009, 13:34 |
AD7six |
good thanks dogmatic69 |
# |
Sep 12th 2009, 13:34 |
dogmatic69 |
hey AD7six, how you doing? |
# |
Sep 12th 2009, 13:26 |
BlackIce |
GreaterCoreQuad: you could use afterFind to join them manually |
# |
Sep 12th 2009, 13:24 |
dogmatic69 |
GreaterCoreQuad: you cant join over different dbs |
# |
Sep 12th 2009, 13:22 |
GreaterCoreQuad |
i can view all my documents fine, but it just refuses to perform a join with users (which now belongs to another database) to get usernames |
# |
Sep 12th 2009, 13:21 |
GreaterCoreQuad |
i have a Document belongsTo User, so in the index of Document it shows the list of Users each document belongs to. if i moved the `documents` table to another database, it no longer shows the usernames |
# |
Sep 12th 2009, 13:11 |
GreaterCoreQuad |
do we have a feature for passing parameters into a model's constructor? |
# |
Sep 12th 2009, 13:05 |
sky_l3ppard |
but this is more like bug not an enhancement if it does not work with behavior |
# |
Sep 12th 2009, 13:04 |
sky_l3ppard |
i tested and it really runs the query |
# |
Sep 12th 2009, 13:04 |
sky_l3ppard |
) |
# |
Sep 12th 2009, 13:02 |
pearcec |
Saturdaies ;) |
# |
Sep 12th 2009, 13:02 |
pearcec |
ugh -- well that was the issue. This is why i shouldn't work on Saturdays |
# |
Sep 12th 2009, 13:02 |
pearcec |
sky_l3ppard: I think it is model magic. |
# |
Sep 12th 2009, 13:02 |
sky_l3ppard |
strange |
# |
Sep 12th 2009, 13:01 |
pearcec |
magic |
# |
Sep 12th 2009, 13:01 |
pearcec |
sky_l3ppard: hmm I wonder why the find worked. |
# |
Sep 12th 2009, 13:00 |
sky_l3ppard |
if you did not named it Categories in the model |
# |
Sep 12th 2009, 13:00 |
sky_l3ppard |
it should be Category |
# |
Sep 12th 2009, 13:00 |
pearcec |
sky_l3ppard: yep |
# |
Sep 12th 2009, 13:00 |
sky_l3ppard |
Categories is your model? |
# |
Sep 12th 2009, 12:59 |
pearcec |
just want to call the recover from the shell and it isn't there. |
# |
Sep 12th 2009, 12:59 |
pearcec |
It works find I have loaded other objects into it. |
# |
Sep 12th 2009, 12:59 |
pearcec |
I am using tree. |
# |
Sep 12th 2009, 12:59 |
pearcec |
sky_l3ppard: I called this $r=$this->Categories->Behaviors->attached(); and it is empty |
# |
Sep 12th 2009, 12:59 |
sky_l3ppard |
your behavior.php is in /app/model/behaviors/ ? |
# |
Sep 12th 2009, 12:58 |
sky_l3ppard |
pearcec, did you checked for attached behaviors? |
# |
Sep 12th 2009, 12:58 |
pearcec |
the model works though I can do a find no problem. |
# |
Sep 12th 2009, 12:57 |
sky_l3ppard |
GreaterCoreQuad, http://book.cakephp.org/view/86/Creating-and-Destroying-Associations-on-the-Fly |
# |
Sep 12th 2009, 12:57 |
pearcec |
jrod: yea |
# |
Sep 12th 2009, 12:57 |
GreaterCoreQuad |
sky_l3ppard: i'm still quite lost, any online literature i can turn to? |
# |
Sep 12th 2009, 12:56 |
sky_l3ppard |
it should be if it is located in one of behaviors paths |