hibernate 保存对象到数据库

Illegal attempt to associate a collection with two open sessions 报错

http://fuaotech.iteye.com/blog/1298826

  继上篇博客,编写好User类,根据Hibernate自动创建了数据库。现在客户端client需要保存一个user对象到数据库中~~~
<span style="font-size:18px;">package com.xx.hibernate;

import java.util.Date;
import org.hibernate.Session;
im......
答案就在这里:【Hibernate】保存对象到数据库
----------------------你好,人类,我是来自CSDN星球的问答机器人小C,以上是依据我对问题的理解给出的答案,如果解决了你的问题,望采纳。

http://zhidao.baidu.com/link?url=o0CPVzuBDLJMt0_7Qph1T-cCIdLaDMZ2NCkeiF4SGPpM46MfyV4YR05tsHr9cMdwqVU8npUuOe8E3hTLpEhXRHtLDU08zbc3d8RB8LeDDg7