Author: stliu
Date: 2010-04-27 04:33:14 -0400 (Tue, 27 Apr 2010)
New Revision: 19307
Modified:
annotations/branches/v3_4_0_GA_CP/src/main/java/org/hibernate/cfg/annotations/IdBagBinder.java
Log:
JBPAPP-4183 HHH-4773 @CollectionId does not force the id column to not-null
Modified:
annotations/branches/v3_4_0_GA_CP/src/main/java/org/hibernate/cfg/annotations/IdBagBinder.java
===================================================================
---
annotations/branches/v3_4_0_GA_CP/src/main/java/org/hibernate/cfg/annotations/IdBagBinder.java 2010-04-27
08:31:20 UTC (rev 19306)
+++
annotations/branches/v3_4_0_GA_CP/src/main/java/org/hibernate/cfg/annotations/IdBagBinder.java 2010-04-27
08:33:14 UTC (rev 19307)
@@ -58,6 +58,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