-
Notifications
You must be signed in to change notification settings - Fork 54
Closed
Description
In my Spring Data JDBC project I have custom NamingStrategy (predefined prefix is added to entity name):
private static final String TABLE_NAME_PREFIX = "foo_";
@Bean
public NamingStrategy namingStrategy() {
return new NamingStrategy() {
@Override
public String getTableName(Class<?> type) {
Assert.notNull(type, "Type must not be null");
return TABLE_NAME_PREFIX + ParsingUtils.reconcatenateCamelCase(type.getSimpleName(), "_");
}
};
}
I want to have the same table names generated by AnnotationProcessor in Q-classes.
What is recommended way to adjust it in AnnotationProcessor?
It seems that enough should be:
- writing my own ExtendedTypeFactory implementation which extends CustomExtendedTypeFactory and overrides one method: getTableNameEntityType model).
- overriding createTypeFactory method of SpringDataJdbcAnnotationProcessorBase and use implementation of ExtendedTypeFactory (created in first step) instead of CustomExtendedTypeFactory
But it turns out it is impossible due to CustomExtendedTypeFactory class visibility issue. What is the reason this class is not an public class?
Metadata
Metadata
Assignees
Labels
No labels