摘要: jpa 的实体必须有@Id,并且无法从父类继承。 阅读全文
posted @ 2014-10-14 18:06 LeonGo 阅读(604) 评论(1) 推荐(0) 编辑
摘要: Hibernate: create table City (cityId varchar(255) not null, cityName varchar(200), remark longtext, versionNum integer, country_countryID varchar(255)... 阅读全文
posted @ 2014-10-14 16:59 LeonGo 阅读(259) 评论(0) 推荐(0) 编辑
摘要: MySQL 5中,出现错误提示:Field 'id' doesn't have a default value解决方法一:打开my.ini,查找sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"修改为sq... 阅读全文
posted @ 2014-10-14 16:54 LeonGo 阅读(2262) 评论(0) 推荐(0) 编辑
摘要: 需要使用persistence.xml进行配置。 1 2 3 4 org.hibernate.ejb.HibernatePersistence 5 dataSource --> 6 net.etec.ftm.domain.City 7 net.etec.ftm.do... 阅读全文
posted @ 2014-10-14 15:22 LeonGo 阅读(1085) 评论(0) 推荐(0) 编辑
摘要: 1 改为1 JTA 在jee环境下运行RESOURCE_LOCAL在jse环境下使用 阅读全文
posted @ 2014-10-14 15:07 LeonGo 阅读(3441) 评论(0) 推荐(0) 编辑
摘要: The resource identified by this request is only capable of generating responses with characteristics not acceptable according to the request "accept" ... 阅读全文
posted @ 2014-10-14 10:26 LeonGo 阅读(1151) 评论(0) 推荐(0) 编辑