![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
hibernate
认真的coder
不断学习,不断进步。wx:keep4ing
展开
-
EventManager web 应用
首先,写一个servlet:public class EventManagerServlet extends HttpServlet { protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {原创 2012-06-08 01:52:23 · 537 阅读 · 0 评论 -
hibernate配置文件,数据库相关配置
oracle.jdbc.driver.OracleDriver jdbc:oracle:thin:@127.0.0.1:1521:orcl cjq cjq 1 org.hibernate.dialect.OracleDialect原创 2012-06-08 00:40:41 · 664 阅读 · 0 评论 -
保存对象、关系映射
首先是Event类, public class Event { private int id; private String title; private Date date; private Set participants = new HashSet(); public Event() {}原创 2012-06-08 01:04:50 · 503 阅读 · 0 评论 -
org.hibernate.MappingException: Unknown entity
====1===org.hibernate.MappingException: Unknown entity: cjq.hibernate.tutorial.domain.Event at org.hibernate.internal.SessionFactoryImpl.getEntityPersister(SessionFactoryImpl.java:1192) at org.h原创 2012-06-14 01:03:52 · 4486 阅读 · 0 评论 -
集合例子
package eg;import java.util.Set;public class Parent { private long id; private Set children; public long getId() { return id; } private void setId(long id) { this.id=id; }转载 2012-08-15 10:14:55 · 1049 阅读 · 0 评论 -
An association from the table PersonAddress refers to an unmapped class
cjq\hibernate\tutorial\domain01\Person.hbm.xml文件内容为: "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">原创 2012-08-25 23:12:53 · 2947 阅读 · 0 评论