On Fri, 25 Aug 2006, Philippe Lang wrote:

> obj = DRbObject.new(nil, 'druby://localhost:9000')
>
> g = obj.find(1)
> puts "#{g.id} | #{g.name}"
> g.flowers.each do |f|
>  puts "#{f.id} | #{f.garden_id} | #{f.name}"
> end
> ------------------------------------------------------
>
>
> ... I get:
>
> ------------------------------------------------------
> ar_client.rb:8: warning: Object#id will be deprecated; use Object#object_id
> 67884862 | garden1
> ar_client.rb:10: warning: Object#id will be deprecated; use Object#object_id
> 67882632 | 1 | flower1
> ar_client.rb:10: warning: Object#id will be deprecated; use Object#object_id
> 67880122 | 1 | flower2
> ------------------------------------------------------

certain methods are treated specially by drb.  it was a mistake for rails to
override Object#id for exatly this kind of scenario - many peice of code
require it.

you need to do something like

class << ActiveRecord
   alias "id__", "id"
end

and then use this method.

> Warning disappeared, but Ids are still wrong.
>
> Does anyone understand what happens here?

you are calling Object#id/object_id - no ActiveRecord#id - check out the drb
source to see why.

-a
-- 
to foster inner awareness, introspection, and reasoning is more efficient than
meditation and prayer.
- h.h. the 14th dalai lama