File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -107,10 +107,11 @@ def add_related_identifiers_recursive_case
107107 end
108108
109109 def data_type_identifier_by_data_type_condition
110+ dt = DataType . arel_table
110111 dti = DataTypeIdentifier . arel_table
111112 dtr = DataTypeRule . arel_table
112113
113- config_id_condition = dti [ :id ] . eq (
114+ basic_rule_condition = dti [ :id ] . eq (
114115 Arel ::Nodes ::NamedFunction . new (
115116 'CAST' ,
116117 [
@@ -122,7 +123,7 @@ def data_type_identifier_by_data_type_condition
122123 )
123124 )
124125
125- array_condition = Arel ::Nodes ::NamedFunction . new (
126+ input_types_any_condition = Arel ::Nodes ::NamedFunction . new (
126127 'ANY' ,
127128 [
128129 Arel ::Nodes ::NamedFunction . new (
@@ -140,10 +141,12 @@ def data_type_identifier_by_data_type_condition
140141 ]
141142 )
142143
143- array_id_condition = dti [ :id ] . eq ( array_condition )
144+ input_types_rule_condition = dti [ :id ] . eq ( input_types_any_condition )
145+
146+ parent_type_condition = dt [ :parent_type_id ] . eq ( dti [ :id ] )
144147
145148 Arel ::Nodes ::Grouping . new (
146- config_id_condition . or ( array_id_condition )
149+ basic_rule_condition . or ( input_types_rule_condition ) . or ( parent_type_condition )
147150 )
148151 end
149152end
Original file line number Diff line number Diff line change 165165 end
166166 end
167167
168+ let! ( :data_type_identifier_as_parent_type ) do
169+ create ( :data_type_identifier , data_type : data_type3 , runtime : runtime ) . tap do |dti |
170+ data_type1 . parent_type = dti
171+ data_type1 . save!
172+ end
173+ end
174+
168175 let! ( :data_type_identifier_in_generic_mapper_source ) do
169176 create ( :data_type_identifier , data_type : data_type1 , runtime : runtime )
170177 end
204211 data_type_identifier_with_generic_mapper . id ,
205212 data_type_identifier_in_generic_mapper_source . id ,
206213 data_type_identifier_in_contains_type_rule . id ,
207- data_type_identifier_in_input_types_rule . id
214+ data_type_identifier_in_input_types_rule . id ,
215+ data_type_identifier_as_parent_type . id
208216 )
209217 end
210218
273281 second_data_type_identifier_in_generic_mapper_source . id ,
274282 data_type_identifier_in_generic_mapper_source . id ,
275283 data_type_identifier_in_contains_type_rule . id ,
276- data_type_identifier_in_input_types_rule . id
284+ data_type_identifier_in_input_types_rule . id ,
285+ data_type_identifier_as_parent_type . id
277286 )
278287 end
279288 end
You can’t perform that action at this time.
0 commit comments