Yii Framework Forum: why alias name for the primary table in a relational AR query is changed to be 't' - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

why alias name for the primary table in a relational AR query is changed to be 't' Rate Topic: -----

#1 User is offline   johnpupu 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 11
  • Joined: 09-August 09

Posted 13 January 2010 - 06:06 AM

in CHANGELOG
I see
The alias name for the primary table in a relational AR query is changed to be 't' (Qiang)

could somebody tell me why ?

if i name a table t, it will get some errors ??

我在CHANGELOG
看到
The alias name for the primary table in a relational AR query is changed to be 't' (Qiang)
想請問一下,為什麼要把這個改成 t 呢

這樣要是我有一個 t table , 這樣會炸掉??
0

#2 User is offline   johnpupu 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 11
  • Joined: 09-August 09

Posted 13 January 2010 - 06:21 AM

ref.
http://code.google.c...0Summary&id=796

http://www.yiiframew...__gopid__33623

http://code.google.c...s/detail?id=818


i see this in issue 796
Because table name can be very different from model name that is hard to remember and
type. For example Post model's table can be named like "my_prefix_posts".

is it personal problem?

這是個人的問題??
記不住table 的名稱, 還下什麼sql 的query ??

這感覺太不直覺了....
有table 的名稱直接下 遠比 alias 直覺很多吧~
0

#3 User is offline   horizons 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 120
  • Joined: 18-December 08

Posted 13 January 2010 - 09:47 AM

i guess i have the same problem as you
http://www.yiiframew...-table-changed/

this default model table alias change give me really headaches cause I would had to change many many codelines only cause of this change. But I also think that the last word isn't said so this could be changed or extended in the next version (hopefully!)
0

Share this topic:


Page 1 of 1
  • 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