Yii Framework Forum: An extension of CActiveRecord for loading data out of join tables - Yii Framework Forum

Jump to content

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

An extension of CActiveRecord for loading data out of join tables Rate Topic: -----

#1 User is offline   fsb 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 131
  • Joined: 09-January 11

Posted 09 November 2011 - 08:01 PM

I couldn't find a satisfactory approach to loading data from a join table at the same time as loading the joined objects. In other words, A and B are joined via J and J has some pertinent data that should load automatically when an A object loads its Bs.

My first stab at a general solution is in the form of an extension to CActiveRecord. In the GitHub repository below it is in the context of a standard yiic webapp.

If you are interested, take a look at it. The README serves as an intro and points out where the extension, example models and unit tests lie. The extension itself has plenty of PHPdoc comments.

https://github.com/t.../Movie-Watchers

As a Yii beginner I would welcome comments.

If you think it's worth developing into something that others could use, please suggest what would have to change.
tom[] in #yii on freenode.net

Join the happiest place on Freenode: #yii
We've got a MrFisk the bot, Agent Gillette the yii2-docbot, hilarious banter and all kinds of other groovy stuff going on.
Comparison of Internet Relay Chat clients
Web IRC client
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