Welcome Guest, Not a member yet? Register   Sign In
ActiveRecord for CodeIgniter: Rails-style model interactions
#87

[eluser]beemr[/eluser]
[quote author="frith" date="1203433722"]Am I missing something. Can you only join through a child object?[/quote]

I had the same difficulties, but I think through the child is required. In the end, writing $this->profile->join($this->user) and then finding by 'user_id' is still fairly clear. Users and profiles are usually separated by choice rather than necessity, since you'd normally only ever have one unique unit between the two tables. You might even dump the id off of profiles and go solely with the foreign key 'user_id' as index. Unless you are allowing more than one profile per user.


Messages In This Thread
ActiveRecord for CodeIgniter: Rails-style model interactions - by El Forum - 02-20-2008, 04:54 PM



Theme © iAndrew 2016 - Forum software by © MyBB