activegraph icon indicating copy to clipboard operation
activegraph copied to clipboard

Duplicate nodes with deep with_associations on QueryProxy

Open amitsuryavanshi opened this issue 4 years ago • 0 comments

Additional information which could be helpful if relevant to your issue:

Code example (inline, gist, or repo)

Following spec in spec/e2e/association_proxy_spec.rb fails,

it 'does not fetches duplicate nodes with deep with_associations' do
      Student.create(name: 'Leszek').lessons << science
      Student.create(name: 'Lukasz').lessons << science
      log_queries!

      Student.all.with_associations({lessons: :exams_given}).each do |student|
          student.lessons.each do |lesson|
            expect(lesson.exams_given).to contain_exactly(science_exam, science_exam2) if lesson == science
          end
      end
    end

Runtime information:

Neo4j database version: neo4j gem version: 9.6.0 neo4j-core gem version: NA

amitsuryavanshi avatar Dec 06 '19 09:12 amitsuryavanshi