摘要: 工程是通过MyEclipse database brower 逆向工程生成PO,结果无法 正常完成数据的级联插入(客户与订单关系);java代码如下 :public void saveCustomerAndOrder(){ Session session = sessionFactory.openSession(); Transaction tx = null; try { tx = session.beginTransaction(); Customers c = new Customers("张三","济南",new HashSet()); Orde 阅读全文
posted @ 2013-06-09 11:24 叶汉城 阅读(622) 评论(0) 推荐(0) 编辑
摘要: 报错提示为:org.hibernate.hql.ast.QuerySyntaxException: customers is not mapped [from customers as c]服务层代码 为:public void findCustomerAndOrders(){ Session session = sessionFactory.openSession(); Transaction tx = null; try { tx = session.beginTransaction(); Query q... 阅读全文
posted @ 2013-06-09 11:14 叶汉城 阅读(1116) 评论(0) 推荐(0) 编辑