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

git-svn-id: https://svn.jboss.org/repos/hibernate/core/trunk@19309 1b8cb986-b30d-0410-93ca-fae66ebed9b2
This commit is contained in:
Strong Liu 2010-04-27 08:40:55 +00:00
parent b912a95d54
commit 3c2ecd8afa
1 changed files with 4 additions and 0 deletions

View File

@ -80,6 +80,10 @@ public class IdBagBinder extends BagBinder {
Collections.EMPTY_MAP,
mappings
);
//we need to make sure all id columns must be not-null.
for(Ejb3Column idColumn:idColumns){
idColumn.setNullable(false);
}
Table table = collection.getCollectionTable();
simpleValue.setTable( table );
simpleValue.setColumns( idColumns );