lib/activefacts/generators/cql.rb in activefacts-generators-1.8.1 vs lib/activefacts/generators/cql.rb in activefacts-generators-1.8.2

- old
+ new

@@ -291,11 +291,12 @@ } #{ supertypes.map(&:name)*', ' }" end # Alternate identification of objectified fact type? primary_supertype = supertypes[0] - pi = fact_type.entity_type.preferred_identifier - if pi && primary_supertype && primary_supertype.preferred_identifier != pi + if fact_type.all_role.size > 1 and + pi = fact_type.entity_type.preferred_identifier and + primary_supertype && primary_supertype.preferred_identifier != pi puts identified_by(o, pi) + ';' return end print " where\n\t" end