# |
Sep 21st 2011, 11:24 |
Tykling |
how do I access a related model inside a behavior ? say User actas mybehavior, and User hasone profile, how would I access the profile model inside mybehavior ? |
# |
Sep 21st 2011, 11:23 |
rchavik |
bioiq, no... you'll be better off getting latest from repo |
# |
Sep 21st 2011, 11:04 |
bioiq |
right at the start i got errors running 'cake bake all' |
# |
Sep 21st 2011, 11:04 |
bioiq |
i just got cake via apt-get repositories. The version is 1.2.4. Is it ok to follow the 1.3 tutorial cookbook? |
# |
Sep 21st 2011, 10:43 |
Section58 |
i asume that fixed ? |
# |
Sep 21st 2011, 10:37 |
DidItAgain |
ok will do |
# |
Sep 21st 2011, 10:37 |
Section58 |
if the naming is slightly wrong, cake will search for linkage relations that don't exsist |
# |
Sep 21st 2011, 10:36 |
Section58 |
also look at your $name vars inside your models/controllers |
# |
Sep 21st 2011, 10:36 |
Section58 |
so yeah, rename model file, it might just work (tm) |
# |
Sep 21st 2011, 10:35 |
Section58 |
InstalledBase.php is the correct version for cake 2.0 if your controller was Installed Base, but its not, its Installedbase |
# |
Sep 21st 2011, 10:35 |
Section58 |
for 1.3 in the naming convention of how your controller is |
# |
Sep 21st 2011, 10:35 |
DidItAgain |
okay, what am I doing wrong |
# |
Sep 21st 2011, 10:35 |
Section58 |
your model should look like installedbase.php |
# |
Sep 21st 2011, 10:35 |
DidItAgain |
o_O |
# |
Sep 21st 2011, 10:34 |
Section58 |
the naming is like 1/3 meets 2.0 |
# |
Sep 21st 2011, 10:34 |
Section58 |
so |
# |
Sep 21st 2011, 10:34 |
Section58 |
ACTION does a dance |
# |
Sep 21st 2011, 10:34 |
DidItAgain |
Section58, any guesses? |
# |
Sep 21st 2011, 10:33 |
DidItAgain |
what else am I getting wrong? |
# |
Sep 21st 2011, 10:33 |
DidItAgain |
my models name is InstalledBase.php |
# |
Sep 21st 2011, 10:33 |
DidItAgain |
my controllers name is installedbase_controller.php |
# |
Sep 21st 2011, 10:32 |
DidItAgain |
yes the rest of the db reads correctly |
# |
Sep 21st 2011, 10:31 |
Section58 |
unlikely tho |
# |
Sep 21st 2011, 10:31 |
Section58 |
mysql dieing during the query could also casue that |
# |
Sep 21st 2011, 10:31 |
Section58 |
also, does the rest of the db read correcly ? |
# |
Sep 21st 2011, 10:30 |
Section58 |
or when you are calling something yu didn't know you were |
# |
Sep 21st 2011, 10:30 |
Section58 |
these errors come out when things don't match right |
# |
Sep 21st 2011, 10:30 |
Section58 |
and stuff like that |
# |
Sep 21st 2011, 10:30 |
Section58 |
check out your naming of models |
# |
Sep 21st 2011, 10:29 |
Section58 |
witht he error you get |
# |
Sep 21st 2011, 10:29 |
Section58 |
if $useTable is used, it should say 'installedbases' |
# |
Sep 21st 2011, 10:29 |
Section58 |
if its not mentioned, it should work out what table it is |
# |
Sep 21st 2011, 10:28 |
Section58 |
usetable if set could be wrong |
# |
Sep 21st 2011, 10:28 |
DidItAgain |
usetable?> |
# |
Sep 21st 2011, 10:28 |
DidItAgain |
O_O |
# |
Sep 21st 2011, 10:28 |
Section58 |
maybe there is a dbconfig flag in the model ? |
# |
Sep 21st 2011, 10:28 |
DidItAgain |
took a look at database.php, and its using the correct db |
# |
Sep 21st 2011, 10:28 |
Section58 |
so maybe ... its lookin in the wrong database ? |
# |
Sep 21st 2011, 10:27 |
DidItAgain |
yes already did that |
# |
Sep 21st 2011, 10:27 |
DidItAgain |
clearing = deleting files in models and persistent |
# |
Sep 21st 2011, 10:27 |
DidItAgain |
takes some time to load the next time, then the same thing |