
JPA
bryanliu1982
这个作者很懒,什么都没留下…
展开
-
JPA Primary Keys through ManyToOne Relationships problem
A common model is to have a dependent object share the primary key of its parent. In the case of a OneToOne the childs primary key is the same as the parent, and in the case of a ManyToOne the child转载 2009-04-14 13:47:00 · 2806 阅读 · 0 评论 -
JPA Annotation Reference
Table 1-1 JPA Annotations by CategoryCategoryDescriptionAnnotationsEntityBy default, TopLink JPA assumes that a Java class is non-persistent and not eligible for JPA servic转载 2009-04-14 14:27:00 · 2065 阅读 · 0 评论 -
EJB3.0 JPQL
JPQL就是一种查询语言,具有与SQL 相类似的特征,JPQL是完全面向对象的,具备继承、多态和关联等特性,和hibernate HQL很相似。 查询语句的参数JPQL语句支持两种方式的参数定义方式: 命名参数和位置参数。。在同一个查询语句中只允许使用一种参数定义方式。 命令参数的格式为:“: +参数名”例:Query query = em.createQuery("s转载 2009-04-17 14:46:00 · 1058 阅读 · 0 评论 -
Java Persistence/Identity and Sequencing
Java Persistence/Identity and Sequencing Common Problemsnull is inserted into the database, or error on insert.This typically occurs because the @Id was not configured to use an @GeneratedVa原创 2009-04-28 23:08:00 · 652 阅读 · 0 评论 -
MYSQL 的 MyISAM 和 InnoDB 的困惑
今天用JPA生成数据表,虽然在Entity上已经配置好了一对多和多对一的关系,总是奇怪不能生成外键索引。后来发现是MySQL的 storage engine 的问题。默认的MyISAM是不支持外键的。只有改成 InnoDB才支持外键修改方法,找到 my.ini(在Linux中是my.cnf) 在里面添加或修改(如果有的话)default-storage-engine = Inn原创 2010-05-25 18:15:00 · 884 阅读 · 0 评论