So I created a has_one and has_many relationship with neo4j
class Client
has_one :out , :room, model_class: :Room,rel_class: :AssignedTo
end
class Room
has_many :in , :clients, rel_class: :AssignedTo, model_class: :Client
end
class AssignedTo
include Neo4j::ActiveRel
from_class :Client
to_class :Room
type 'assigned_to'
property :from_date, type: DateTime
property :to_date , type: DateTime
end
I want to accept the Assigned_to relationship from room to client room.clients.each_with_rel works fine but I can't find a way to access the relationship the other way around: client.room.rel All the methods i tried client.room.rel,relationship, assigned_to etc don't seem to work