You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an error about TranslateBehavior with belongsTo relation.
Here is my bug
Error: SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'id' in where clause is ambiguous
If you are using SQL keywords as table column names, you can enable identifier quoting for your database connection in config/app.php.
SQL Query:
SELECT Terms.name AS Terms__name, Terms_name_translation.id AS Terms_name_translation__id, Terms_name_translation.content AS Terms_name_translation__content FROM terms Terms LEFT JOIN terms_i18n Terms_name_translation ON (Terms_name_translation.model = :c0 AND Terms_name_translation.field = :c1 AND Terms_name_translation.locale = :c2 AND Terms.id = (Terms_name_translation.foreign_key)) LEFT JOIN terms_i18n Terms_description_translation ON (Terms_description_translation.model = :c3 AND Terms_description_translation.field = :c4 AND Terms_description_translation.locale = :c5 AND Terms.id = (Terms_description_translation.foreign_key)) WHERE id in (:c6)
Could this be caused by using Auto-Tables?
Some of the Table objects in your application were created by instantiating "Cake\ORM\Table" instead of any other specific subclass.
This could be the cause for this exception. Auto-Tables are created for you under the following circumstances:
The class for the specified table does not exist.
The Table was created with a typo: TableRegistry::get('Atricles');
The class file has a typo in the name or incorrect namespace: class Atricles extends Table
The file containing the class has a typo or incorrect casing: Atricles.php
The Table was used using associations but the association has a typo: $this->belongsTo('Atricles')
The table class resides in a Plugin but no plugin notation was used in the association definition.
Please try correcting the issue for the following table aliases:
The text was updated successfully, but these errors were encountered:
LeLuyen
changed the title
The Table was used using associations but the association has a typo width belongsTo
The Table was used using associations but the association has a typo with belongsTo
Feb 2, 2016
Dear All,
I have an error about TranslateBehavior with belongsTo relation.
Here is my bug
Error: SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'id' in where clause is ambiguous
If you are using SQL keywords as table column names, you can enable identifier quoting for your database connection in config/app.php.
SQL Query:
SELECT Terms.name AS
Terms__name
, Terms_name_translation.id ASTerms_name_translation__id
, Terms_name_translation.content ASTerms_name_translation__content
FROM terms Terms LEFT JOIN terms_i18n Terms_name_translation ON (Terms_name_translation.model = :c0 AND Terms_name_translation.field = :c1 AND Terms_name_translation.locale = :c2 AND Terms.id = (Terms_name_translation.foreign_key)) LEFT JOIN terms_i18n Terms_description_translation ON (Terms_description_translation.model = :c3 AND Terms_description_translation.field = :c4 AND Terms_description_translation.locale = :c5 AND Terms.id = (Terms_description_translation.foreign_key)) WHERE id in (:c6)Could this be caused by using Auto-Tables?
Some of the Table objects in your application were created by instantiating "Cake\ORM\Table" instead of any other specific subclass.
This could be the cause for this exception. Auto-Tables are created for you under the following circumstances:
The class for the specified table does not exist.
The Table was created with a typo: TableRegistry::get('Atricles');
The class file has a typo in the name or incorrect namespace: class Atricles extends Table
The file containing the class has a typo or incorrect casing: Atricles.php
The Table was used using associations but the association has a typo: $this->belongsTo('Atricles')
The table class resides in a Plugin but no plugin notation was used in the association definition.
Please try correcting the issue for the following table aliases:
TermsI18n
Terms_name_translation
Terms_description_translation
Please help me!
Thanks you!
The text was updated successfully, but these errors were encountered: