Hibernate Basic value types 'yes_no' and 'true_false'
In Hibernate a lot of Basic value types.
One of them is 'yes_no
' and 'true_false
'. And I was wondering what the fundamental difference between these two types?
I see that in the database for the type of 'yes_no
' written 'Y or N'
and from 'true_false'
written 'F or T'
and no more difference. Then why do we need these tw开发者_如何学Co types?
Why can not we do just one?
It's a convenience for mapping legacy database schemas.
If you have a legacy database schema where boolean values are represented as T
/F
, you use true_false
. If they are represented as Y
/N
, you use yes_no
.
精彩评论