Author: stliu
Date: 2010-04-27 04:31:20 -0400 (Tue, 27 Apr 2010)
New Revision: 19306
Modified:
core/branches/Branch_3_5/annotations/src/main/java/org/hibernate/cfg/annotations/IdBagBinder.java
Log:
HHH-4773 @CollectionId does not force the id column to not-null
Modified:
core/branches/Branch_3_5/annotations/src/main/java/org/hibernate/cfg/annotations/IdBagBinder.java
===================================================================
---
core/branches/Branch_3_5/annotations/src/main/java/org/hibernate/cfg/annotations/IdBagBinder.java 2010-04-27
08:26:14 UTC (rev 19305)
+++
core/branches/Branch_3_5/annotations/src/main/java/org/hibernate/cfg/annotations/IdBagBinder.java 2010-04-27
08:31:20 UTC (rev 19306)
@@ -80,6 +80,10 @@
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 );
Show replies by date