2014年11月7日
摘要: 1、添加数据,代码如下: @Test public void save(){ EntityManagerFactory factory = Persistence.createEntityManagerFactory("learn_jpa"); EntityManager em = factory.createEntityManager(); em.getTransacti... 阅读全文
posted @ 2014-11-07 21:49 hwlsniper 阅读(1249) 评论(1) 推荐(0) 编辑
摘要: 1、大数据字段所需的注解 @Lob ,例如: @Lobprivate String info; 在mysql中映射产生的字段的类型是longtext;在oracle中是 CLOB @Lobprivate Byte[] bytes; mysql中对应longblob;oracle中不能使用byte[]字段加@Lob的方式直接映射 2、大数据字段最好是延迟加载,字段延迟加载时时,如果没有访问字段所对... 阅读全文
posted @ 2014-11-07 20:38 hwlsniper 阅读(699) 评论(0) 推荐(0) 编辑