随笔分类 -  JavaPersistenceWithHibernate第二版笔记

摘要:一、简介 在JPA中,默认所有属性都会persist,属性要属于以下3种情况,Hibernate在启动时会报错 1.java基本类型或包装类 2.有注解 @Embedded 3.有实现java.io.Serializable 二、Overriding basic property defaults 阅读全文
posted @ 2016-04-07 11:13 shamgod 阅读(2182) 评论(0) 推荐(0)
摘要:一、自定义映射的表名 1. 2.用定界符 若全部SQL都加定界符, create an orm.xml file and add the setting <delimited-identifiers/> to its <persistence-unit-defaults> section,Hiber 阅读全文
posted @ 2016-04-04 14:09 shamgod 阅读(2528) 评论(0) 推荐(0)
摘要:一、简介 1.You now have three methods for distinguishing references:  Objects are identical if they occupy the same memory location in the JVM . This can 阅读全文
posted @ 2016-04-04 13:38 shamgod 阅读(330) 评论(0) 推荐(0)
摘要:一、介绍 1.这种引用方式不对,但删除时不能级联 要这种引用方式 2.The Bid class could be a problem. In object-oriented modeling, this is marked as a composition (the association bet 阅读全文
posted @ 2016-04-04 10:52 shamgod 阅读(195) 评论(0) 推荐(0)
摘要:一、结构 二、配置文件约定 The JPA provider automatically picks up this descriptor if you place it in a META-INF /orm.xml file on the classpath of the persistence 阅读全文
posted @ 2016-04-03 17:07 shamgod 阅读(419) 评论(0) 推荐(0)
摘要:一、结构 二、model层 1. 三、配置文件 1.persistence.xml(这个文件似乎不起作用) For the “Hello World” application, you delegate database connection handling to a Java Transacti 阅读全文
posted @ 2016-04-03 11:01 shamgod 阅读(572) 评论(0) 推荐(0)

haha