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
This commit is contained in:
parent
87c75ad036
commit
ce9140c808
|
@ -5,11 +5,9 @@ import java.util.HashMap;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import javax.persistence.AttributeOverride;
|
import javax.persistence.AttributeOverride;
|
||||||
import javax.persistence.AttributeOverrides;
|
import javax.persistence.AttributeOverrides;
|
||||||
import javax.persistence.Column;
|
import javax.persistence.Column;
|
||||||
import javax.persistence.ElementCollection;
|
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
import javax.persistence.EnumType;
|
import javax.persistence.EnumType;
|
||||||
import javax.persistence.Enumerated;
|
import javax.persistence.Enumerated;
|
||||||
|
@ -18,10 +16,10 @@ import javax.persistence.GeneratedValue;
|
||||||
import javax.persistence.Id;
|
import javax.persistence.Id;
|
||||||
import javax.persistence.JoinColumn;
|
import javax.persistence.JoinColumn;
|
||||||
import javax.persistence.JoinTable;
|
import javax.persistence.JoinTable;
|
||||||
|
import javax.persistence.ElementCollection;
|
||||||
|
|
||||||
import org.hibernate.annotations.CollectionOfElements;
|
import org.hibernate.annotations.CollectionOfElements;
|
||||||
import org.hibernate.annotations.IndexColumn;
|
import org.hibernate.annotations.IndexColumn;
|
||||||
import org.hibernate.annotations.MapKey;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Emmanuel Bernard
|
* @author Emmanuel Bernard
|
||||||
|
@ -81,7 +79,6 @@ public class Boy {
|
||||||
@ElementCollection
|
@ElementCollection
|
||||||
@JoinTable(name = "ScorePerNickName", joinColumns = @JoinColumn(name = "BoyId"))
|
@JoinTable(name = "ScorePerNickName", joinColumns = @JoinColumn(name = "BoyId"))
|
||||||
@Column(name = "score", nullable = false)
|
@Column(name = "score", nullable = false)
|
||||||
@MapKey(columns=@Column( name = "mapkey", nullable=false ))
|
|
||||||
public Map<String, Integer> getScorePerNickName() {
|
public Map<String, Integer> getScorePerNickName() {
|
||||||
return scorePerNickName;
|
return scorePerNickName;
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,7 +33,7 @@ public class LocalizedString implements Serializable {
|
||||||
new HashMap<String, String>( 1 );
|
new HashMap<String, String>( 1 );
|
||||||
|
|
||||||
@ElementCollection
|
@ElementCollection
|
||||||
@MapKey( columns = @Column( name = "language_code", nullable=false ) )
|
@MapKey( columns = @Column( name = "language_code" ) )
|
||||||
@Fetch( FetchMode.JOIN )
|
@Fetch( FetchMode.JOIN )
|
||||||
@Filter( name = "selectedLocale",
|
@Filter( name = "selectedLocale",
|
||||||
condition = " language_code = :param " )
|
condition = " language_code = :param " )
|
||||||
|
|
|
@ -4,8 +4,6 @@ package org.hibernate.test.annotations.collectionelement;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.SortedMap;
|
import java.util.SortedMap;
|
||||||
import java.util.TreeMap;
|
import java.util.TreeMap;
|
||||||
|
|
||||||
import javax.persistence.Column;
|
|
||||||
import javax.persistence.ElementCollection;
|
import javax.persistence.ElementCollection;
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
import javax.persistence.GeneratedValue;
|
import javax.persistence.GeneratedValue;
|
||||||
|
@ -25,7 +23,7 @@ public class Matrix {
|
||||||
@GeneratedValue
|
@GeneratedValue
|
||||||
private Integer id;
|
private Integer id;
|
||||||
|
|
||||||
@MapKey(type = @Type(type="integer"), columns=@Column( name = "mapkey", nullable=false ) )
|
@MapKey(type = @Type(type="integer") )
|
||||||
@ElementCollection
|
@ElementCollection
|
||||||
@Sort(type = SortType.NATURAL)
|
@Sort(type = SortType.NATURAL)
|
||||||
@Type(type = "float")
|
@Type(type = "float")
|
||||||
|
|
Loading…
Reference in New Issue