[Ruby-activeldap-discuss] How to form has_many and belongs_to relationship between LDAP and SQL?
Petr Janda
petr at punchyouremployer.com
Fri Dec 8 22:56:23 EST 2006
Hey,
I have this in my domain.rb
class Domain < ActiveLdap::Base
belongs_to :client, :many => "clientId", :foreign_key => "id"
ldap_mapping :dn_attribute => "dc", :prefix => "ou=domains", :classes
=> ['top', 'dcObject', 'dNSDomain', 'webgateSchema']
end
but I get error:
" Unknown key(s): filter" when trying to do something like
puts domain.client.name
When I remove :many => "clientId", I get:
"undefined method `dn_attribute' for Client:Class"
Thanks,
Petr
More information about the Ruby-activeldap-discuss
mailing list