-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
with 关联,主表无法指定字段 #208
Comments
我也遇到和你一样的问题 |
CREATE TABLE CREATE TABLE CREATE TABLE CREATE TABLE 商品模型类 class Goods extends AbstractModel
} 调用方法 $list = (new Goods())->alias("goods")->field("*") |
好的,感谢反馈,马上处理。 |
好的,感谢 |
你好,方便提供下数据吗? |
你好,请问方便提供一条测试数据及表结构,用于debug吗? |
INSERT INTO 32234234234 ',0,0,1629950001,1630056931);INSERT INTO INSERT INTO |
easyswoole框架版本号、orm组件版本号 [Version]
easyswoole 3.4.5 , orm 1.4
$res = ClientDataAccountModel::create()
->alias('dataAccount')
->field('dataAccount.id')
->with('account_users')
->all(['id' => $account_id]);
//关联模型
return $this->belongsToMany(OrganizationUserModel::class, "sk_client_data_account_users",'data_account_id','data_database_uid',function($query){
$query->fields("id,organization_id,account,status,name,phone,username");
});
}
报错如下
Unknown column 'data_account_id' in 'field list' [SELECT dataAccount.id, data_account_id FROM sk_client_data_account AS
dataAccount
WHEREid
= 1经过排查是
abstractModel
960 行
if (!in_array($pk, $this->fields) && $this->supplyPk == true){
$this->fields[] = $pk;
}
这里的问题
排查情况和最小复现脚本 [Tests and Recurrence]
The text was updated successfully, but these errors were encountered: