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就可以啦
------解决方案--------------------------------------------------------
给分啊 !!不用答了,,这么简单