Well you are in the Controller admin, does this controller has also a
model and a table ?
Do you bring back the userdetails without the BasicInfo ot nothing at
all .. I suspect an error, turn the DEBUG to 2 in core.php and you will
see the generated SQL statement.
If you respect the naming convention you can just make var $hasOne =
array('BasicInfo');
The debug mode will tell you more..
On Dec 6, 8:59 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> even i changed the naming convention with my primary key it doesn't
> helps me
> making the $hasOne to work well.... still getting NULL value as a
> result.
>
> ===========================
> My Model:
> class UserDetail extends AppModel
> {
> var $name = 'UserDetail';
> var $hasOne = array('BasicInfo' =>
> array('className' => 'BasicInfo',
> 'conditions' => '',
> 'order' => '',
> 'foreignKey' =>
> 'userdetails_id'
> )
> );
>
> }class BasicInfo extends AppModel
> {
> var $name = 'BasicInfo';
>
> }My Controller:
> class AdministratorController extends AppController
> {
> var $uses = array('UserDetail', 'AdminDetail');
>
> function view_isers()
> {
> $result = $this->UserDetail->findAll();
> }
>
> }that's my code.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---