In few of our entity classes we have an annotation called @NoPersist. If the value of this annotation is false (configurable centrally elsewhere) then we are supposed to make the property behave as @Transient.
2 questions regarding this:
Still now we were using MetadataProviderInjector to set a custom MetadataProvider written by us which in turn internally use an implementation of AnnotationReader to return @Transient when required. Unfortunately with Hibernate 5.2 that mechanism is not functional anymore. Do you have any example of doing this using Integrator or any other means.
I tried using a custom integrator, entity listener and attribute converter but none of those seems to work. It helps if you provide some working example which can be easily tried which will not break again with advent of Hibernate 6 and later.
If the same behavior is required with SchemaExporter to not to export the column when required, how to do this effectively.
I just need the examples to be simple enough so that we can maintain them with future Hibernate versions (v6.0 or else) going forward.