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.setLength( (long) column.length() );
|
||||||
annotatedColumn.setPrecision( column.precision() );
|
annotatedColumn.setPrecision( column.precision() );
|
||||||
annotatedColumn.setScale( column.scale() );
|
annotatedColumn.setScale( column.scale() );
|
||||||
if ( inferredData.getProperty().isAnnotationPresent(Array.class) ) {
|
annotatedColumn.handleArrayLength( inferredData );
|
||||||
annotatedColumn.setArrayLength( inferredData.getProperty().getAnnotation(Array.class).length() );
|
|
||||||
}
|
|
||||||
// annotatedColumn.setPropertyHolder( propertyHolder );
|
// annotatedColumn.setPropertyHolder( propertyHolder );
|
||||||
// annotatedColumn.setPropertyName( getRelativePath( propertyHolder, inferredData.getPropertyName() ) );
|
// annotatedColumn.setPropertyName( getRelativePath( propertyHolder, inferredData.getPropertyName() ) );
|
||||||
annotatedColumn.setNullable( column.nullable() ); //TODO force to not null if available? This is a (bad) user choice.
|
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;
|
return annotatedColumn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void handleArrayLength(PropertyData inferredData) {
|
||||||
|
if ( inferredData.getProperty().isAnnotationPresent(Array.class) ) {
|
||||||
|
setArrayLength( inferredData.getProperty().getAnnotation(Array.class).length() );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private static String logicalColumnName(
|
private static String logicalColumnName(
|
||||||
PropertyData inferredData,
|
PropertyData inferredData,
|
||||||
String suffixForDefaultColumnName,
|
String suffixForDefaultColumnName,
|
||||||
|
@ -917,6 +921,7 @@ public class AnnotatedColumn {
|
||||||
column.applyGeneratedAs( inferredData, 1 );
|
column.applyGeneratedAs( inferredData, 1 );
|
||||||
column.applyCheckConstraint( inferredData, 1 );
|
column.applyCheckConstraint( inferredData, 1 );
|
||||||
column.extractDataFromPropertyData( propertyHolder, inferredData );
|
column.extractDataFromPropertyData( propertyHolder, inferredData );
|
||||||
|
column.handleArrayLength( inferredData );
|
||||||
column.bind();
|
column.bind();
|
||||||
return columns;
|
return columns;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue