@@ -54,13 +54,14 @@ private class ValidateRunImportedPlateTrigger implements Trigger
5454
5555 @ Override
5656 public void beforeUpdate (
57- TableInfo table ,
58- Container c ,
59- User user ,
60- @ Nullable QueryUpdateService .InsertOption insertOption , @ Nullable Map <String , Object > newRow ,
61- @ Nullable Map <String , Object > oldRow ,
62- ValidationException errors ,
63- Map <String , Object > extraContext
57+ TableInfo table ,
58+ Container c ,
59+ User user ,
60+ @ Nullable QueryUpdateService .InsertOption insertOption ,
61+ @ Nullable Map <String , Object > newRow ,
62+ @ Nullable Map <String , Object > oldRow ,
63+ ValidationException errors ,
64+ Map <String , Object > extraContext
6465 ) throws ValidationException
6566 {
6667 if (oldRow == null || errors .hasErrors () || !oldRow .containsKey (WellTable .Column .PlateId .name ()))
@@ -92,7 +93,8 @@ private class EnsureSampleWellTypeTrigger implements Trigger
9293 @ Override
9394 public @ Nullable ManagedColumns getManagedColumns ()
9495 {
95- return ManagedColumns .all (WellTable .Column .Type .name ());
96+ // "Type" is a calculated column, so we do not include it as a managed column
97+ return ManagedColumns .ignored (WellTable .Column .Type .name ());
9698 }
9799
98100 private void addTypeSample (
@@ -121,8 +123,8 @@ private void addTypeSample(
121123 newRow .put (WellTable .Column .Type .name (), WellGroup .Type .SAMPLE .name ());
122124 }
123125
124- // Since "Type" is a calculated column (i.e. not in the database) its value is not included in
125- // the original row, thus, we need to query for it dynamically.
126+ // Since "Type" is a calculated column (i.e., not in the database), its value is not included in
127+ // the original row; thus, we need to query for it dynamically.
126128 private boolean hasWellType (Container c , User user , @ Nullable Map <String , Object > oldRow )
127129 {
128130 if (oldRow == null )
@@ -157,7 +159,6 @@ public void beforeInsert(
157159 )
158160 {
159161 addTypeSample (c , user , newRow , null , extraContext );
160- setInsertManagedColumns (newRow , existingRecord , insertOption );
161162 }
162163
163164 @ Override
@@ -173,7 +174,6 @@ public void beforeUpdate(
173174 )
174175 {
175176 addTypeSample (c , user , newRow , oldRow , extraContext );
176- setUpdateManagedColumns (newRow , oldRow , insertOption );
177177 }
178178 }
179179
0 commit comments