When to use each? To what do they map in the database?

Was it helpful?


from Hibernate:

boolean, yes_no and true_false are all alternative encodings for a Java boolean or java.lang.Boolean.


Follow true_false, if you like T/F at database level. Otherwise, use yes_no, it will give you Y/N in the database.

By the way, got to know that there are some issues with these, which result in unexpected value. For example here and here, Few seems fixed already in successive updates, though.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top