我正在使用 kohana orm,但是当我使用关系时它返回“奇怪”的查询:
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)
奇怪的是,我的意思是列名之前的冒号和要链接的无效列名(object.id
应该是object.city
)
我的问题是:
我必须在我的对象模型中更改什么才能将列链接更改为object.city
?
列名前的这些冒号是什么意思?