【发布时间】:2015-04-19 03:16:26
【问题描述】:
我正在尝试使用 hybridauth 让社交登录工作
我的 app/Model/SocialProfile.php 看起来像
<?php
App::uses('AppModel', 'Model');
App::uses('AuthComponent', 'Controller/Component');
class SocialProfile extends AppModel {
public $belongsTo = 'User';
}
我的 app/Model/User.php 看起来像
<?php
App::uses('AppModel', 'Model');
class User extends AppModel {
public $hasMany = array(
'SocialProfile' => array(
'className' => 'SocialProfile',
)
);
....
我收到此错误: 错误:在数据源默认值中找不到模型 SocialProfile 的表 social_profiles。
感谢您的帮助
【问题讨论】:
-
你的表名是否与 -> social_profiles 完全一样?
标签: facebook cakephp model hybridauth social-media