OK,
This is the models
==================================
<?php
class Person extends AppModel {
var $name = 'Person';
var $useTable = 'people';
var $validate = array(
'lastname' => array('alphaNumeric'),
'firstname' => array('alphaNumeric'),
'street' => array('alphaNumeric'),
'city' => array('alphaNumeric'),
'state' => array('alphaNumeric'),
'zip' => array('alphaNumeric'),
'email' => array('email'),
'phone' => array('alphaNumeric'),
'fax' => array('alphaNumeric')
);
//The Associations below have been created with all possible keys, those
that are not needed can be removed
var $hasMany = array(
'Event' => array('className' => 'Event',
'foreignKey' => 'person_id',
'dependent' => false,
'conditions' => '',
'fields' => '',
'order' => '',
'limit' => '',
'offset' => '',
'exclusive' => '',
'finderQuery' => '',
'counterQuery' => ''
),
'WORK' => array('className' => 'Work',
'foreignKey' => 'person_id',
'dependent' => false,
'conditions' => '',
'fields' => '',
'order' => '',
'limit' => '',
'offset' => '',
'exclusive' => '',
'finderQuery' => '',
'counterQuery' => ''
)
);
}
?>
==================================================
<?php
class Work extends AppModel {
var $name = 'Work';
var $useTable = 'works';
//The Associations below have been created with all possible keys, those
that are not needed can be removed
var $belongsTo = array(
'person' => array('className' => 'person',
'foreignKey' => 'person_id',
'conditions' => '',
'fields' => '',
'order' => ''
)
);
}
?>
======================================
----- Original Message -----
From: "Samuel DeVore" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Friday, February 15, 2008 4:04 PM
Subject: Re: Unidentified property error
>
> On Feb 15, 2008 3:52 PM, sixs <[EMAIL PROTECTED]> wrote:
>>
>> Hi,
>> I have a person table and each person could have many work records in the
>> works table.
>> I use bake and I tell cake that a person has many work records, and in
>> the
>> works I tell cake that many works records could belong to a person
>> record.
>> It generates the code with t table of personand I can select a person to
>> view and cake displays alll work records that belong to that person.When
>> I
>> click on the new work button i get this error instead of showing me the
>> empty form with the table of person_id to select
>> a person from that relates to the person- work link.
>> my guess is that there is a problem with your model associations
>
> can you post your model files for work and people models
>
> you can use http://bin.cakephp.org to keep from cluttering up the list
> if you want (click save if you want to save the paste for more then a
> day
>
> --
> --
> (the old fart) the advice is free, the lack of crankiness will cost you
>
> - its a fine line between a real question and an idiot
>
> http://blog.samdevore.com/archives/2007/03/05/when-open-source-bugs-me/
> http://blog.samdevore.com/cakephp-pages/my-cake-wont-bake/
> http://blog.samdevore.com/cakephp-pages/i-cant-bake/
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---