English 中文(简体)
如何在关系中通过条款具体规定违约命令
原标题:How to specify default order by clause in relations
  • 时间:2010-08-02 15:08:52
  •  标签:
  • symfony1
comment:
  tableName: comments
  columns:
    comment_id:
      type: integer(4)
      primary: true
      notnull: true
      autoincrement: true
    news_feed_id:
      type: integer(4)
  relations:
    newsFeed:
      class: newsFeed
      local: news_feed_id
      foreign: news_feed_id
      foreignAlias: comments

当我选择新闻社时,我想就每个新闻发表评论。 简言之,能否通过一栏发布评论。 我首先要介绍最新的情况。 我希望我的问题是明确的。 我想根据儿童表的结果,具体说明与秩序有关的额外信息。

最佳回答

你写了这封信,希望你取得结果。 舍马不是这样做的适当场所。 你在问询中这样做。

你 did切地 past了你的全方位chem。 我假定,在comment类别(如果不适用,则尝试使用时间充裕的行为):

Doctrine_Query::create()
  ->select( n.*, c.* )
  ->from( newsFeed n )
  ->innerJoin( n.comment c )
  ->orderBy( c.created_at DESC );
问题回答

暂无回答




相关问题
To populate select options at backend using Symfony?

the symfony form is, nation =>new sfWidgetFormChoice(array( choices => NationPeer::getAllNation())), township =>new sfWidgetFormChoice(array( choices => TownshipPeer::...

Seriously speeding up PHP?

I ve been writing PHP for years, and have used every framework under the sun, but one thing has always bugged me... and that s that the whole bloody thing has to be interpreted and executed every time ...

How to unit-test an enterprise symfony project?

I´m working on a huge project at my work. We have about 200 database tables, accordingly a huge number of Models, Actions and so on. How should I begin to write tests for this? My biggest problem ...

edit profile from frontend - symfony

I succeeded to create a register form, and now users can register my site. But I can t create a form where users can edit their profile. I have sf_guard_user and sf_guard_user_profile in my schema....

热门标签