Replacement for Hibernate’s deprecated Type annotation?

For those who are wondering what’s the alternative approach with hibernate 6, you have to change this from:

@Type(type = "org.hibernate.type.NumericBooleanType")
private Boolean debug = false;

to this:

@Convert(converter = org.hibernate.type.NumericBooleanConverter.class)
private Boolean debug = false;

Refer – https://docs.jboss.org/hibernate/orm/6.0/userguide/html_single/Hibernate_User_Guide.html#basic-boolean

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)