Skip to content
This repository has been archived by the owner on Dec 22, 2020. It is now read-only.

Commit

Permalink
Better support for alternative primary keys
Browse files Browse the repository at this point in the history
  • Loading branch information
awreece committed Nov 13, 2017
1 parent b001d8c commit 8f7c22f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/mosql/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ def collections_for_mongo_db(db)
def primary_sql_keys_for_schema(schema)
keys = []
if schema[:meta][:composite_key]
keys = schema[:meta][:composite_key]
keys = schema[:meta][:composite_key].map{ |k| k.to_sym }
else
keys << schema[:columns].find {|c| c[:source] == '_id'}[:name]
end
Expand Down

0 comments on commit 8f7c22f

Please sign in to comment.