I am using kohana orm but it return "weird" query when i am using relations:
SELECT
city.city_id AS city:city_id,
city.country AS city:country,
city.city_name AS city:city_name,
object.id AS id, object.name AS name,
object.title AS title,
object.author AS author,
object.city AS city,
object.description AS description,
object.access AS access,
object.created AS created
FROM objects AS object
LEFT JOIN cities AS city ON (object.id = city.city_id)
In weird I mean colons before column names and invalid column name to link ( object.id
should be object.city
)
My questions are:
What do I have to change in my object model to change column link to object.city
?
What means these colons before column name?
Finally I found a solution here .
I just added 'identifier' => '"',
to my database config file (application/config/database.php) and now everything works fine. I hope it will be helpful for someone :)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.