make @Array apply to "implicit" columns
This commit is contained in:
parent
1d1053ef08
commit
36099deb2e
|
@ -745,9 +745,7 @@ public class AnnotatedColumn {
|
|||
annotatedColumn.setLength( (long) column.length() );
|
||||
annotatedColumn.setPrecision( column.precision() );
|
||||
annotatedColumn.setScale( column.scale() );
|
||||
if ( inferredData.getProperty().isAnnotationPresent(Array.class) ) {
|
||||
annotatedColumn.setArrayLength( inferredData.getProperty().getAnnotation(Array.class).length() );
|
||||
}
|
||||
annotatedColumn.handleArrayLength( inferredData );
|
||||
// annotatedColumn.setPropertyHolder( propertyHolder );
|
||||
// annotatedColumn.setPropertyName( getRelativePath( propertyHolder, inferredData.getPropertyName() ) );
|
||||
annotatedColumn.setNullable( column.nullable() ); //TODO force to not null if available? This is a (bad) user choice.
|
||||
|
@ -769,6 +767,12 @@ public class AnnotatedColumn {
|
|||
return annotatedColumn;
|
||||
}
|
||||
|
||||
private void handleArrayLength(PropertyData inferredData) {
|
||||
if ( inferredData.getProperty().isAnnotationPresent(Array.class) ) {
|
||||
setArrayLength( inferredData.getProperty().getAnnotation(Array.class).length() );
|
||||
}
|
||||
}
|
||||
|
||||
private static String logicalColumnName(
|
||||
PropertyData inferredData,
|
||||
String suffixForDefaultColumnName,
|
||||
|
@ -917,6 +921,7 @@ public class AnnotatedColumn {
|
|||
column.applyGeneratedAs( inferredData, 1 );
|
||||
column.applyCheckConstraint( inferredData, 1 );
|
||||
column.extractDataFromPropertyData( propertyHolder, inferredData );
|
||||
column.handleArrayLength( inferredData );
|
||||
column.bind();
|
||||
return columns;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue