On Jun 22, 7:37 am, "a...@hard-soft.at" <a...@hard-soft.at> wrote:
> My full error is:
> Fatal error: Call to a member function getColumnType() on a non-object
> in /usr/share/php/cake/libs/model/model.php on line 976

Well, looking at line of code in Model
http://github.com/cakephp/cakephp/blob/master/cake/libs/model/model.php#L976

You don't try very hard to give information do you ;)

What's $this (what class is it, what's the alias) at the time of the
error, what's $model - and more importantly why isn't it an object.

I'd prefer you not to parrot the information to the group without
thinking: Investigate and find out why. Somewhere you have an invalid
model definition, or some other such factor, interfering with whatever
$this->$model is supposed to be.

The hack you posted in your original post is just circumventing some
kind of app problem - you aren't fixing anything in cake with that
because it should be impossible for $this->othermodel to /not/ be an
instance of another model.

hth,

AD


It's pretty obvious that
 * $this->WhateverModelIs is set
 * It's not an object

Which means you should investigate how you've managed to set/
overwrite
>
> On 22 Jun., 07:30, "a...@hard-soft.at" <a...@hard-soft.at> wrote:
>
>
>
> > This is my sourcecode:
>
> >http://bin.cakephp.org/view/1519432926
>
> > I checkd $this->data before saving and it looks ok:
>
> > Array ( [Mandant] => Array ( [mandant_id] =>
> > b1234cae2f9d0e75a246f66753d2fce3 [anamnese] => testing [anamnese_m] =>
> > testing ) )
>
> > very strange to me
>
> > On 21 Jun., 16:58, AD7six <andydawso...@gmail.com> wrote:
>
> > > On Jun 21, 4:37 pm, Jon Bennett <jmbenn...@gmail.com> wrote:
>
> > > > >> As you say Andy, without the OPs error message it's all just hot air.
>
> > > > > Well not really, I've used varchar(255) as a primary key before (in my
> > > > > settings plugin).
>
> > > > Fair enough, as you've clearly stated, it can be done - so there must
> > > > be something other than his schema at fault here.
>
> > > There we go :)

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to