Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I map a CHAR(1) to a boolean using Hibernate for Java?

Tags:

java

hibernate

How do I map a CHAR(1) to a boolean using Hibernate for Java?

like image 315
ScArcher2 Avatar asked Jan 15 '09 16:01

ScArcher2


People also ask

Which of the following elements is used to map one to many relationships hibernate?

The <property> element is used to map a Java class property to a column in the database table. The name attribute of the element refers to the property in the class and the column attribute refers to the column in the database table.

Does hibernate have mapping?

hibernate mappings are one of the key features of hibernate . they establish the relationship between two database tables as attributes in your model. that allows you to easily navigate the associations in your model and criteria queries.

What hibernate mapping types?

These types are “clob”, “blob”, “binary”, “text” etc. Clob and blob data types are present to maintain the data type mapping of large objects like images and videos.


1 Answers

The true_false or yes_no types will do this for you.

like image 103
Andrzej Doyle Avatar answered Nov 14 '22 22:11

Andrzej Doyle