开发者

Differerence between hibernate types: boolean, yes_no, true_false

开发者 https://www.devze.com 2022-12-18 00:51 出处:网络
When to use each? To what do the开发者_StackOverflow中文版y map in the database?Follow true_false, if you like T/F at database level. Otherwise, use yes_no, it will give you Y/N in the database.

When to use each? To what do the开发者_StackOverflow中文版y map in the database?


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.


from Hibernate: http://docs.jboss.org/hibernate/stable/core.old/reference/en/html_single/#mapping-types-basictypes

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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号