# Classes with created_by/updated_by issues ###### tags: `nitro` These classes contain integer columns named `created_by` and/or `updated_by` in addition to assocations with the same exact name. In some cases there are additional conflicts. For example, `voided_by` or other. ### What's the problem? With Rails 6.0, queries using one of these attributes in a WHERE clause can trigger an exception because it can't properly determine the real thing it's searching for. The ID or the relation, generating an infinite loop. ### What do we do about it? Not all of these may be causing existing problems within Nitro. `CreditScore` is a known issue, but others may not be because they simply aren't using the associations in queries. They are, however, time bombs. Regardless, they are candidates to either have the column or association renamed or have the offending association removed if they aren't truly used. We recommend removing it whenever that is possible (`track_creator_updater` and `track_audit_data` uses `creator` and `updater`, and the foreign keys `created_by_id` and `updated_by_id` by default). ## Class List - [x] CellphoneCarrier (TTNS) - [x] Color (TTNS) - [x] ComponentCategory (GLC) - [x] ComponentType (GLC) - [x] ContractAddendum (TTNS) - [ ] CreditScore - [x] DependencyType (GLC) - [x] DriverProfile (TTNS) - [x] Email::EmailCampaign (TTNS - no new migration needed) - [x] EquipmentMake (TTNS) - [x] EquipmentModel (TTNS) - [x] EquipmentType (TTNS) - [ ] Estimate - [x] EventDocument (LEDG) - [x] EventSchedule (LEDG) - [ ] Flag - [ ] InsideSalesCampaign - [ ] InstallationCrew - [x] LeadStatus (GLC) - [x] LeadTimeMethod (GLC) - [ ] MarketerActivity (LEDG) - [ ] MaterialType - [x] MentorGroup (GLC) - [ ] OpsReason - [ ] PerformancePayment (GLC) - [x] PerformanceTeam (GLC) - [ ] PermitLocation - [ ] PermitNote - [ ] Permit - [x] ProductColor (TTNS) - [x] ProjectAdjustmentReason (GLC) - [ ] ProjectAdjustment (GLC) - [x] ProjectComponentCosting (GLC) - [x] ProjectState (GLC) - [x] ProjectTrack (GLC) - [ ] RequestReason - [ ] RequestType - [ ] Requirement (Shared with Compliance::Requirement) - [ ] RequirementAttachment - [ ] RequirementEmail - [ ] RetailClub (LEDG) - [ ] SalesTaxPercentage - [ ] SourceCluster - [ ] SourceExpense - [ ] StateDownpaymentPercentage - [ ] Supplier - [ ] UnitOfMeasurement - [ ] UserDocument - [ ] UserTerritory - [ ] Vendor - [ ] Waiver - [ ] Workflow