>  Person.find(:all, :conditions => { :university => victoria_wellington })
>

I'm quite suspicious where you're using find_by_some_association,
couldn't you be walking the associations back in the other direction.

victoria_wellington.people

> I'm planning on making it work for belongs_to and has_one (including
> polymorphic association).

How are you planning on making it work for has_one,  what would the
query look like?

> The discussion was basically around whether or not we should tie hash
> conditions to the database field names.
>
> There was also some discussion about find_by_association, i.e
>
>  Person.find_by_university(victoria_wellington)
>
> Josh has a patch that I can merge into all this stuff pretty easily.
>
> Pratik asked me to restart the discussion here, so I'd be interested
> to hear what everybody thinks.

I'd be a little concerned about adding some special case code to the
sanitize_sql logic, but if some work was undertaken to rationalise all
that stuff at the same time then this kind of thing could be a nice
addition.

Good stuff

-- 
Cheers

Koz

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to