On Tuesday, January 8, 2013 7:35:21 PM UTC-8, 吴玉宏 wrote:

> Hi Jeremy,
>   Thanks for your reply!
>    I also have another trouble in writing the code in ruby 1.9 mode.
>    see the code below:
>
>     one_to_many :linksource_visits
>
>           DB[:linksource_visits].
>         join(:geo_locations, ((:linksource_visits__ip >= 
> :geo_locations__ip_from) & (:linksource_visits__ip <= 
> :geo_locations__ip_to)))
>

This is the same issue with the inequality methods on Symbol already being 
defined.  The only difference is that you can't use a virtual row in this 
case.  As a general rule, you can just wrap the symbol in Sequel.expr:

   join(:geo_locations, ((Sequel.expr(:linksource_visits__ip) >= 
:geo_locations__ip_from) & (Sequel.expr(:linksource_visits__ip) <= 
:geo_locations__ip_to)))

Thanks,
Jeremy

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/sequel-talk/-/N4vIXXibpFcJ.
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/sequel-talk?hl=en.

Reply via email to