Set non generic non accepté ?
Bonjour ;)
avec le JDK 1.6.0_18,
je declare :
Code:
1 2 3 4 5 6 7
|
import java.util.Set;
public class Category implements Serializable{
private int ID;
private String name;
private Category parentCategory;
private Set childCategories = new HashSet(); |
ma table est :
Citation:
CREATE TABLE IF NOT EXISTS `category` (
`ID` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(50) NOT NULL,
PRIMARY KEY (`ID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;
et à l'exécution la JVM renvoie :
Citation:
Caused by: javax.persistence.PersistenceException: org.hibernate.MappingException: Could not determine type for: java.util.Set, for columns: [org.hibernate.mapping.Column(categories)]
Pourquoi je ne peux utiliser de Set non généric ?