Yii Framework Forum: Active record/query condition based on a related model attribute... - Yii Framework Forum

Jump to content

  • (2 Pages)
  • +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

Active record/query condition based on a related model attribute... Rate Topic: -----

#21 User is offline   drech 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 100
  • Joined: 06-April 09

Posted 15 January 2010 - 04:30 PM

View PostHoracio Segura, on 15 January 2010 - 03:27 PM, said:

maybe the problem is the alias of "Article"
in 1.1.0 the alias is harcode to "t"
see http://www.yiiframew...de/database.arr
Disambiguating Column Names
try
$allArticles = Article::model()->with('category', 'author', 'reviews', 'proficiency')->together()->findAll(array('order'=>'t.proficiencyId,t.title'));



I missed that bit in the guide. Of course it works now ;)

Thanks Horacio
0

Share this topic:


  • (2 Pages)
  • +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users