Skip to content

Commit

Permalink
fix: correct foreign key between AllPactPublications and PactVersion
Browse files Browse the repository at this point in the history
This was causing the wrong content to be loaded when two consumers had identical verificable content.

Fixes: #249
  • Loading branch information
bethesque committed Nov 1, 2018
1 parent 2f014f0 commit 59f76c7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/pact_broker/pacts/all_pact_publications.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class AllPactPublications < Sequel::Model(:all_pact_publications)

set_primary_key :id
associate(:one_to_many, :tags, :class => "PactBroker::Domain::Tag", :reciprocal => :version, :key => :version_id, :primary_key => :consumer_version_id)
associate(:many_to_one, :pact_version, :key => :pact_version_sha, :primary_key => :sha)
associate(:many_to_one, :pact_version, :key => :pact_version_id, :primary_key => :id)

This comment has been minimized.

Copy link
@mefellows

mefellows Nov 1, 2018

Member

Ahh, makes so much sense!


dataset_module do
include PactBroker::Repositories::Helpers
Expand Down

0 comments on commit 59f76c7

Please sign in to comment.