From: <hib...@li...> - 2006-04-26 22:48:58
|
Author: epbernard Date: 2006-04-26 18:48:54 -0400 (Wed, 26 Apr 2006) New Revision: 9799 Modified: trunk/HibernateExt/metadata/src/java/org/hibernate/cfg/annotations/CollectionBinder.java Log: add user security belts Modified: trunk/HibernateExt/metadata/src/java/org/hibernate/cfg/annotations/CollectionBinder.java =================================================================== --- trunk/HibernateExt/metadata/src/java/org/hibernate/cfg/annotations/CollectionBinder.java 2006-04-26 17:07:08 UTC (rev 9798) +++ trunk/HibernateExt/metadata/src/java/org/hibernate/cfg/annotations/CollectionBinder.java 2006-04-26 22:48:54 UTC (rev 9799) @@ -254,6 +254,11 @@ log.debug( "Collection role: " + StringHelper.qualify( propertyHolder.getPath(), propertyName ) ); collection.setRole( StringHelper.qualify( propertyHolder.getPath(), propertyName ) ); + if (mapKeyColumns != null && mapKeyPropertyName != null) { + throw new AnnotationException("Cannot mix @javax.persistence.MakKey and @org.hibernate.annotations.MapKey " + + "on the same collection: " + StringHelper.qualify( propertyHolder.getPath(), propertyName ) ); + } + //set laziness collection.setFetchMode( fetchMode ); collection.setLazy( fetchMode == FetchMode.SELECT ); |