When I upgraded I began experiencing an issue with a self-referential relationship where in the relationship in my Postgres database would appear, but would not in Neo4j.
class User < ActiveRecord::Base
has_secure_password
attr_accessible :bio, :email, :first_name, :last_name, :password, :password_confirmation
include Neoid::Node
has_many :follows
has_many :reverse_follows, foreign_key: :following_id, class_name: "Follow"
has_many :followers, through: :reverse_follows, source: :user
has_many :followings, through: :follows
end
class Follow < ActiveRecord::Base
include Neoid::Relationship
attr_accessible :user_id, :following_id
belongs_to :following, class_name: "User"
belongs_to :user
neoidable do |c|
c.relationship start_node: :user, end_node: :following, type: :follows
end
end
To recreate:
create a user1 and a user2
user1.followings << user2
save user1
user2.followings << user1
save user2
In 0.0.51 this behaves as expected:
In 0.1.2 only one relationship is created:
I've tried it with per model indexing both on and off, just to be sure, with the same result. Is there some other change I'm missing?
Also; this might not be the appropriate place for this, but thanks a million for your work elado.
When I upgraded I began experiencing an issue with a self-referential relationship where in the relationship in my Postgres database would appear, but would not in Neo4j.
To recreate:
In 0.0.51 this behaves as expected:
In 0.1.2 only one relationship is created:
I've tried it with per model indexing both on and off, just to be sure, with the same result. Is there some other change I'm missing?
Also; this might not be the appropriate place for this, but thanks a million for your work elado.