我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

如何在连接后获取具有相同列名的属性(Symfony框架与Propel)?

I have two tables:

Table1:

  • id
  • attr1
  • fk1(Table2)
  • fk2(Table2)

Table2:

  • id
  • name

I want to join Table1 with Table2 on fk1 and fk2. How can I do this two joins and after that get both name attributes from Table2. I would like to do it with Table1Query rather than Table1Peer.

Take a look at my answer to this question: Naming Generated Functions in Propel

Since you have two foreign keys that point to the same table, you need to utilize the "phpName" attribute on the "foreign-key" element.

近期文章

  • Mod在单个规则上重写一个或另一个变量?
  • PHP MySQL_return_rows = echos 1然后是0
  • 提交一个或另一个查询
  • PHP in_array查找任何匹配项
  • 模型是否可以填充自己的属性?
  • PHP链接点击效果
  • Paypal网站付款专业版 - 当前汇率?
  • 使“收件人”字段仅显示一个收件人
  • 需要包含变量的文件
  • Magento数据库修复工具不工作
  • 爆炸数据/将其转换为PHP数组
  • 每次从数据库回收数据得到
  • CakePHP访问完整的用户信息
  • 如何更改块视图分页样式
  • 获取从加载电影到youtube的响应
  • 如何生成在PHP中获得3次权限的自动URL?
  • 如何分配记录以避免与另一个用户同时更新
  • 如何使用选定的键值对PHP多维关联数组进行排序
  • 具有特殊用途的php中的array_intersect()
  • 连接json_ecode'd数据的问题

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华