Thứ Tư, 14 tháng 10, 2015

Hibernate: working with

In DB, one table has a column with datatype is SET
Link: http://stackoverflow.com/q/23949030

I config like that:
@Column(name = "workingDays", nullable = false, unique = false)
@Type(type="org.hibernate.type.settype")
private Set<String> workingDays; 




But,
Caused by: java.lang.ClassNotFoundException: org.hibernate.type.settype

Change to org.hibernate.type.SetType, but
Caused by: org.hibernate.MappingException: Could not instantiate Type: org.hibernate.type.SetType

Fix: Custom type in Hibernate
Link: http://www.javacodegeeks.com/2015/06/custom-boolean-user-type-with-hibernate-jpa.html

Continue ...

- Comments

0 nhận xét:

Đăng nhận xét