We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
First model:
class Child extends \yii\sphinx\ActiveRecord { /** * @inheritdoc */ public static function indexName() { return '{{%child}}'; } /** * @inheritdoc */ public function rules() { return [ [['id'], 'required'], [['id'], 'unique'], [['id_parent'], 'integer'], ]; } }
Second model:
class Parent extends \yii\sphinx\ActiveRecord { /** * @inheritdoc */ public static function indexName() { return '{{%parent}}'; } /** * @inheritdoc */ public function rules() { return [ [['id'], 'required'], [['id'], 'unique'], [['name'], 'string'] ]; } /** * @return \yii\db\ActiveQuery */ public function getChilds() { return $this->hasMany(Child::className(), ['id_parent' => 'id']); } }
Problem:
Parent::find()->with('childs')->all();
PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 sphinxql: syntax error, unexpected QUOTED_STRING, expecting CONST_INT
The text was updated successfully, but these errors were encountered:
Unable to reproduce. Obviously there is a type missmatch between child.id_parent and parent.id. Most likely it is the same problem as #55
child.id_parent
parent.id
Sorry, something went wrong.
klimov-paul
No branches or pull requests
First model:
Second model:
Problem:
PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 sphinxql: syntax error, unexpected QUOTED_STRING, expecting CONST_INT
The text was updated successfully, but these errors were encountered: