hibernate无法向数据库插入数据
运行时显示:Hibernate:insertintod_user(email,nickname,password)values(?,?,?)无法将值保存到数据库中,该怎么...
运行时显示:
Hibernate:
insert
into
d_user
(email, nickname, password)
values
(?, ?, ?)
无法将值保存到数据库中,该怎么解决这个问题?
映射文件:
<class name="com.imvcc.domain.User" table="d_user">
<id name="id" type="integer">
<column name="id" />
<generator class="native" />
</id>
<property name="email" type="string">
<column name="email" length="50" not-null="true" />
</property>
<property name="nickname" type="string">
<column name="nickname" length="50" />
</property>
<property name="password" type="string">
<column name="password" length="50" not-null="true" />
</property>
</class>
hibernate配置文件也没问题,相应的实体类也有,为什么会无法保存数据?该怎么解决啊
先谢过热心解答网友~ 展开
Hibernate:
insert
into
d_user
(email, nickname, password)
values
(?, ?, ?)
无法将值保存到数据库中,该怎么解决这个问题?
映射文件:
<class name="com.imvcc.domain.User" table="d_user">
<id name="id" type="integer">
<column name="id" />
<generator class="native" />
</id>
<property name="email" type="string">
<column name="email" length="50" not-null="true" />
</property>
<property name="nickname" type="string">
<column name="nickname" length="50" />
</property>
<property name="password" type="string">
<column name="password" length="50" not-null="true" />
</property>
</class>
hibernate配置文件也没问题,相应的实体类也有,为什么会无法保存数据?该怎么解决啊
先谢过热心解答网友~ 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询