2013-08-27 37 views
0

我使用Kohana的ORM,但它在我使用的關係回到「怪異」的查詢:奇怪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
這是什麼意思這些冒號列名之前?

回答

2

最後我找到了解決方案here
我剛剛添加'identifier' => '"',到我的數據庫配置文件(application/config/database.php),現在一切正常。我希望這會對某人有所幫助:)