IgnitedRecord 1.0 pre-release - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22) +--- Thread: IgnitedRecord 1.0 pre-release (/showthread.php?tid=7996) |
IgnitedRecord 1.0 pre-release - El Forum - 10-31-2008 [eluser]m4rw3r[/eluser] WARNING: This is a long post, and discusses some internals of IR I can implement a way if you want (it can be handy sometimes). To get the text field data from your result you should do something like this: Code: foreach($result as $u) The thing with joining qualifiers neatly to entries is very hard to do in a nice way. The problem is that dbobj2ORM() only handles one level of joins (from my dissection of the Doctrine ORM code, I think it also is limited to one level). So everything that is joined needs to be placed on the "master" object (in your case, user). If you select the data of the qualifier it will be assigned to the user object (not as an object, because Through relations are not supported yet). I have redesigned the way dbobj2ORM() decides where to put a certain column (not committed yet). I can use the prefix of the aliased name, but that may cause other problems. If an aliased column collides with a "native" column, the "native" column won't be available to the user. In your case it will work as expected if you alias the columns from qualifiers as entries_fieldname, then it will be assigned to the entry object(s). I'll add it as an option (it is faster, because it saves a column lookup). Example of a common(?) collision: Users table has columns id and username Posts table has columns id and user_id A post has one user Then the alias of users.id will be user_id and collide with user_id Because of this, the post object will not contain the user_id column (but it is accessable through post->user->id) How often can this happen? I mean collisions with an alias and a column selected with a * ? And if it does happen, is it okay with it happening? (in the above case, I'll say that it is ok) IgnitedRecord 1.0 pre-release - El Forum - 11-01-2008 [eluser]dexcell[/eluser] Again, thank you very much m4rw3r. IgnitedRecord 1.0 pre-release - El Forum - 11-01-2008 [eluser]dexcell[/eluser] I've sent you PM about a little bug, i don't know if it's sent or not, because my sent message box count still zero (CI website problem?) IgnitedRecord 1.0 pre-release - El Forum - 11-01-2008 [eluser]m4rw3r[/eluser] I've got it, and it is fixed (you have to check the checkbox titled "Store a copy in the Sent messages folder?"). IgnitedRecord 1.0 pre-release - El Forum - 11-01-2008 [eluser]m4rw3r[/eluser] I've made a basic screencast featuring IR here! IgnitedRecord 1.0 pre-release - El Forum - 11-02-2008 [eluser]dexcell[/eluser] Ah, miss that option. Great video I Think you should include that link in IR assembla page. Btw what text editor are you using in that video? IgnitedRecord 1.0 pre-release - El Forum - 11-02-2008 [eluser]m4rw3r[/eluser] Texteditor: e-texteditor Theme: IDLE (had to change temporarily, just for you ), need a better one next time I do a screencast OS: Modded Win XP Media Center IgnitedRecord 1.0 pre-release - El Forum - 11-02-2008 [eluser]dexcell[/eluser] Thanks for the answer And, i just realized there is currently no IR_form.php in SVN Can i have a copy please IgnitedRecord 1.0 pre-release - El Forum - 11-02-2008 [eluser]m4rw3r[/eluser] Added it to svn, but it needs some more types of fields and general cleaning. IgnitedRecord 1.0 pre-release - El Forum - 11-03-2008 [eluser]dexcell[/eluser] Thanks m4rw3r. |