Working with JPA, I would like to be able to save BitSet to the database and pull it back.
Suppose I have:
@Entity
@Table(name = "myTable")
public class MyClass {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "Object_Id")
protected long id;
@Column(name = "Tags")
protected BitSet tags;
... getters & setters etc...
}
Should also define "columnDefinition"? I really don't understand how this is saved (using toString ()?) And, besides, how does it return the load from the database.
Could you help me with this?
Thank!
source
share