读书人

hibernate中bit字段为什么存入数据库的

发布时间: 2012-04-25 19:32:32 作者: rapoo

hibernate中bit字段为什么存入数据库的值总是0?
hibernate中bit字段为什么存入数据库的值总是0?

添加页面如下:

HTML code
<input type="radio" id="sex"                                                                value="0" name="allroundStandard.sex" />                                                            男    <input type="radio" id="sex1"                                                                value="1" name="allroundStandard.sex" /> 女 


读取正常。

HTML code
<c:if test="${allroundStandard.sex==true}">                                                        <span class="STYLE1">女</span>                                                    </c:if>                                                    <c:if test="${allroundStandard.sex==false}">                                                        <span class="STYLE1">男</span>                                                    </c:if>




[解决办法]
改成char就可以啦
[解决办法]
给分啊 !!不用答了,,这么简单

读书人网 >Java Web开发

热点推荐