Database fixes

Issue #1069 is fixed only for DiscoveredReflection. For ConventionalReflection exception about missing column 'id' is still thrown. Not sure how to solve it.