HHH-4773 @CollectionId does not force the id column to not-null

git-svn-id: https://svn.jboss.org/repos/hibernate/core/trunk@19291 1b8cb986-b30d-0410-93ca-fae66ebed9b2
This commit is contained in:
Strong Liu 2010-04-26 02:03:34 +00:00
parent 593064b71f
commit ce82b844dd
1 changed files with 5 additions and 3 deletions

View File

@ -439,9 +439,11 @@ public class Ejb3Column {
column.setPropertyName( column.setPropertyName(
BinderHelper.getRelativePath( propertyHolder, inferredData.getPropertyName() ) BinderHelper.getRelativePath( propertyHolder, inferredData.getPropertyName() )
); );
column.setNullable( //although in theory, null is an acceptable value in a Map key
col.nullable() //we need force this column to be not null, as it intended to be the primary key.
); //TODO force to not null if available? This is a (bad) user choice. if ( nullability != Nullability.FORCED_NULL ) {
column.setNullable( false );
}
column.setUnique( col.unique() ); column.setUnique( col.unique() );
column.setInsertable( col.insertable() ); column.setInsertable( col.insertable() );
column.setUpdatable( col.updatable() ); column.setUpdatable( col.updatable() );