activefacts-metamodel 1.9.18 → 1.9.19

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1a9c5fec87ace6e0757e0266aa42d21ec7208d78
4
- data.tar.gz: 432d7942772ab7c7eda0a4c93e9369e3f9ef044a
3
+ metadata.gz: eeb83d74101d461d8cf6f2c2bdf328f0360e9801
4
+ data.tar.gz: 46578f35a2a40c566794efd96d0ce44b48ee3c1b
5
5
  SHA512:
6
- metadata.gz: 8876140eafbbd5eb1f67653cab2c5b0233acd1d8f3cae8e79bb6f766085664349f0cc1fcd730adfa5059889b2ded423d3dd686b5e7039ca4e176039211c8b366
7
- data.tar.gz: 4dd4b1fad6303b5d98abbb703bde756ecdcd756d7b00edf5c76c9d7afec108ad5db569f3bdfcf6129f894ad449f1a39b6f1e0aabc3d11f5c7337b00d5853a48c
6
+ metadata.gz: df0dd4afd63eb21922ad711eb859cf39e7f79e8c2169563a2ca70b6283ca7340e2c9bf64032868060a88c277cf73a92553df31bfcd4c02cc26a1addf947af3a4
7
+ data.tar.gz: cd90076037d3854b08623c431c609456bb1d4bbdc8381e0ba3b5ffafa502e711981a185fd239473107f88ff3484bab3b621c1da36e0db31dc4fbe87701b0785e
@@ -234,11 +234,21 @@ module ActiveFacts
234
234
  value_constraint = narrow_value_constraint(value_constraint, vt.value_constraint)
235
235
  end
236
236
  end while stype = vt.supertype
237
+ auto_assign =
238
+ if is_auto_assigned
239
+ if in_primary_index and !in_foreign_key
240
+ {auto_assign: is_auto_assigned} # It's auto-assigned here
241
+ else
242
+ {auto_assign: nil} # It's auto-assigned elsewhere
243
+ end
244
+ else
245
+ {} # It's not auto-assigned
246
+ end
237
247
 
238
248
  [ vt.name,
239
249
  (length ? {length: length} : {}).
240
250
  merge!(scale ? {scale: scale} : {}).
241
- merge!(is_auto_assigned ? { auto_assign: (in_primary_index and !in_foreign_key)} : {}).
251
+ merge!(auto_assign).
242
252
  merge!({mandatory: path_mandatory}).
243
253
  merge!(value_constraint ? {value_constraint: value_constraint} : {})
244
254
  ]
@@ -1,5 +1,5 @@
1
1
  module ActiveFacts
2
2
  module Metamodel
3
- VERSION = "1.9.18"
3
+ VERSION = "1.9.19"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activefacts-metamodel
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.18
4
+ version: 1.9.19
5
5
  platform: ruby
6
6
  authors:
7
7
  - Clifford Heath