You are correct. I found did exactly this and was able to use this
information to create a schema for the table-less model. Here is what
I defined in my model (for anyone who reads this later).
var $_schema = array(
'firstName' => array('type' => 'string', 'length' => 30),
'lastName' => array('type' => 'string', 'length' => 30),
'email' => array('type' => 'string', 'length' => 30),
'msg' => array('type' => 'text')
)
On Jan 30, 7:07 pm, nate <[EMAIL PROTECTED]> wrote:
> I'm guessing based on the error that you're trying to use a model
> which is not attached to a table to create the form. In one of your
> controllers, take a model that *is* attached to a table and try
> something like the following:
>
> pr($this->Model->schema());
> die();
>
> That should give you an idea on how to implement schema().
>
> On Jan 30, 6:28 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
>
> > I am creating a form using 1.2 beta. I got one of the memory
> > exhausted errors, and when I commented the lines out of debugger.php I
> > get this...
>
> > (FormHelper::create) Unable to use model field data. If you are using
> > a model without a database table, try implementing schema() [CORE/cake/
> > libs/view/helpers/form.php, line 124]
>
> > (Model::getColumnType) Unable to locate model field data. If you are
> > using a model without a database table, try implementing schema()
> > [CORE/cake/libs/model/model.php, line 959]
>
> > I have never heard of schema(). Is this something new to 1.2 beta? I
> > am guessing it is a way to use the model for validation, without a
> > real db table?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---