We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 8da5a40 + baf3a4d commit f8b9324Copy full SHA for f8b9324
lib/activerecord-multi-tenant/model_extensions.rb
@@ -30,7 +30,7 @@ def partition_key
30
31
# Avoid primary_key errors when using composite primary keys (e.g. id, tenant_id)
32
def primary_key
33
- return @primary_key if @primary_key
+ return @primary_key if defined?(PRIMARY_KEY_NOT_SET) ? !PRIMARY_KEY_NOT_SET.equal?(@primary_key) : @primary_key
34
35
primary_object_keys = Array.wrap(connection.schema_cache.primary_keys(table_name)) - [partition_key]
36
0 commit comments