Open dcrissman opened 8 years ago
To make this solution generic, we would need some sort of a rule engine to decide when not to do a consistency check. That is a lot of complexity.
What if we created a new class level annotation that took an OGNL expression, then in the ConsistencyChecker.checkConsistency method we use the expression to validate the legacyEntity using reflection. If the check fails, simply return false.
This is doable, though a significant level of effort. So far we have only one case where we'd like to ignore consistency check based on values rather than data structure, right?
Yes, just one case.
I did some preliminary investigation/work and I agree that the effort would be fairly significant.
Say you decided to not migrate over certain data points to lightblue for whatever reason. Maybe certain rows were deactivated in the old system and there is no need to carry them forward, perhaps denoted by a boolean or byte flag column in the legacy data source. In this scenario, you would get a data inconsistency every time the deactivated row was referenced. Would it be possible to disable the consistency check based on that boolean column in the legacy data source?