lightblue-platform / lightblue-migrator

GNU General Public License v3.0
3 stars 13 forks source link

facade RFE: conditional consistency check ignores #373

Open dcrissman opened 8 years ago

dcrissman commented 8 years ago

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?

paterczm commented 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.

dcrissman commented 8 years ago

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.

paterczm commented 8 years ago

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?

dcrissman commented 8 years ago

Yes, just one case.

I did some preliminary investigation/work and I agree that the effort would be fairly significant.