The attached testcase is copied from https://github.com/hibernate/hibernate-orm/blob/4.3.6.Final/hibernate-entitymanager/src/test/java/org/hibernate/jpa/test/convert/CollectionElementConversionTest.java
with 2 changes: 1. Change autoApply to false at @Converter for ColorTypeConverter 2. Add @Convert(converter=ColorTypeConverter.class) to Set<ColorType> colors
org.hibernate.MappingException: Could not determine type for: ConvertTest$ColorType, at table: cust_color, for columns: [org.hibernate.mapping.Column(color)] at org.hibernate.mapping.SimpleValue.getType(SimpleValue.java:336) at org.hibernate.mapping.SimpleValue.isValid(SimpleValue.java:310) at org.hibernate.mapping.Collection.validate(Collection.java:315) at org.hibernate.mapping.Set.validate(Set.java:40) at org.hibernate.cfg.Configuration.validate(Configuration.java:1362) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1849) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1928)
|