Yii Framework Forum: ActiveRecordBehavior defining relations? - Yii Framework Forum

Jump to content

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

ActiveRecordBehavior defining relations? Rate Topic: -----

#1 User is offline   Thomas Jensen 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 150
  • Joined: 01-August 09

Posted 13 January 2010 - 05:14 PM

Hi,

I've tried to make an behavior which functionality is to count visitors to a certain item. My only question is, isn't it possible to define relations, on behalf of the active record class, in a behavior, and if not; why, if it is then; how?

Thanks :-)
0

#2 User is offline   gazbond 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 60
  • Joined: 02-November 09
  • Location:Hertfordshire, UK

Posted 13 January 2010 - 06:31 PM

I looked into trying to define new active relations but couldn't see how.
Instead I created a behavior with a config method similar to relations(), before realizing that I didn't need the new relations anyway, doh!
See here: Help with AR relationships

Hope this helps.
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