问题描述
||
对不起,但是我真的没有学说。我以为自己得到了,但我想不是因为出现以下错误:
Unknown relation alias Artikelkategorie
使用以下schema.yml:
Artikelkategorie:
connection: doctrine
tableName: artikelkategorie
columns:
id:
type: integer(4)
fixed: false
unsigned: true
primary: true
autoincrement: true
superid:
type: integer(4)
fixed: false
unsigned: true
primary: false
notnull: true
autoincrement: false
branche_id:
type: integer(4)
fixed: false
unsigned: true
primary: false
notnull: true
autoincrement: false
Portfolio:
connection: doctrine
tableName: portfolio
columns:
artikel_id:
type: integer(4)
fixed: false
unsigned: true
primary: true
autoincrement: false
markt_id:
type: integer(4)
fixed: false
unsigned: true
primary: true
autoincrement: false
relations:
Artikel:
local: id
foreign: zustand_id
type: many
Portfolio:
local: id
foreign: zustand_id
type: many
按照我的action.class.php(简短)
$this->unt_cat_list = Doctrine_Query::create()
->select(\'p.*,a.*\')
->from(\'portfolio p\')
->innerJoin(\'p.Artikelkategorie a\')
->Where(\'p.markt_id = ? \',array(2))
->Where(\'a.superid = ?\',array(1))
->Where(\'a.branche_id = ?\',array(2))
->execute();
和我的php代码,但我想这没用:
<?php foreach ($unt_cat_list as $cat_list1): ?>
<a href=\"<?php echo url_for(\'shop/category\') . \'/\' . \'id/\' . $cat_list1->getMarktId()?>\"><?php echo $cat_list1->getMarktId() ?></a>
<?php endforeach; ?>
为什么会建立未知关系?在action.class.php查询中我该怎么做?
非常感谢!!!
猎手
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)