From ce9140c808bbe17593317161ce5495bb93b20bc5 Mon Sep 17 00:00:00 2001 From: Juraci Krohling Date: Fri, 5 Jun 2009 11:57:40 +0000 Subject: [PATCH] ANN-840 - Reverted, as we don't want to hide the existing bug git-svn-id: https://svn.jboss.org/repos/hibernate/core/trunk@16700 1b8cb986-b30d-0410-93ca-fae66ebed9b2 --- .../hibernate/test/annotations/collectionelement/Boy.java | 5 +---- .../test/annotations/collectionelement/LocalizedString.java | 2 +- .../hibernate/test/annotations/collectionelement/Matrix.java | 4 +--- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/annotations/src/test/java/org/hibernate/test/annotations/collectionelement/Boy.java b/annotations/src/test/java/org/hibernate/test/annotations/collectionelement/Boy.java index 52c4b47939..4a54bb4611 100644 --- a/annotations/src/test/java/org/hibernate/test/annotations/collectionelement/Boy.java +++ b/annotations/src/test/java/org/hibernate/test/annotations/collectionelement/Boy.java @@ -5,11 +5,9 @@ import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Set; - import javax.persistence.AttributeOverride; import javax.persistence.AttributeOverrides; import javax.persistence.Column; -import javax.persistence.ElementCollection; import javax.persistence.Entity; import javax.persistence.EnumType; import javax.persistence.Enumerated; @@ -18,10 +16,10 @@ import javax.persistence.GeneratedValue; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.JoinTable; +import javax.persistence.ElementCollection; import org.hibernate.annotations.CollectionOfElements; import org.hibernate.annotations.IndexColumn; -import org.hibernate.annotations.MapKey; /** * @author Emmanuel Bernard @@ -81,7 +79,6 @@ public class Boy { @ElementCollection @JoinTable(name = "ScorePerNickName", joinColumns = @JoinColumn(name = "BoyId")) @Column(name = "score", nullable = false) - @MapKey(columns=@Column( name = "mapkey", nullable=false )) public Map getScorePerNickName() { return scorePerNickName; } diff --git a/annotations/src/test/java/org/hibernate/test/annotations/collectionelement/LocalizedString.java b/annotations/src/test/java/org/hibernate/test/annotations/collectionelement/LocalizedString.java index 53341bf20a..5749475d98 100644 --- a/annotations/src/test/java/org/hibernate/test/annotations/collectionelement/LocalizedString.java +++ b/annotations/src/test/java/org/hibernate/test/annotations/collectionelement/LocalizedString.java @@ -33,7 +33,7 @@ public class LocalizedString implements Serializable { new HashMap( 1 ); @ElementCollection - @MapKey( columns = @Column( name = "language_code", nullable=false ) ) + @MapKey( columns = @Column( name = "language_code" ) ) @Fetch( FetchMode.JOIN ) @Filter( name = "selectedLocale", condition = " language_code = :param " ) diff --git a/annotations/src/test/java/org/hibernate/test/annotations/collectionelement/Matrix.java b/annotations/src/test/java/org/hibernate/test/annotations/collectionelement/Matrix.java index 820ac1f216..3cdf325fde 100644 --- a/annotations/src/test/java/org/hibernate/test/annotations/collectionelement/Matrix.java +++ b/annotations/src/test/java/org/hibernate/test/annotations/collectionelement/Matrix.java @@ -4,8 +4,6 @@ package org.hibernate.test.annotations.collectionelement; import java.util.Map; import java.util.SortedMap; import java.util.TreeMap; - -import javax.persistence.Column; import javax.persistence.ElementCollection; import javax.persistence.Entity; import javax.persistence.GeneratedValue; @@ -25,7 +23,7 @@ public class Matrix { @GeneratedValue private Integer id; - @MapKey(type = @Type(type="integer"), columns=@Column( name = "mapkey", nullable=false ) ) + @MapKey(type = @Type(type="integer") ) @ElementCollection @Sort(type = SortType.NATURAL) @Type(type = "float")