Hibernate JPA @Type Example

@Type

The @Type annotation is used to specify the Hibernate @Type used by the currently annotated basic attribute.

Custom BasicType mapping

@Entity(name = "Product")
public static class Product {

@Id
private Integer id;

@Type( type = "bitset" )
private BitSet bitSet;

public Integer getId() {
return id;
}

//Getters and setters are omitted for brevity
}

Comments

Popular posts from this blog

Today Walkin 14th-Sept

Spring Elasticsearch Operations

Hibernate Search - Elasticsearch with JSON manipulation