摘要:
JPA注解持久化类很方便,需要jar包:ejb3-persistence.jar。我用以下三个类来说明用法。sh原创 转载请注明:http://67566894.iteye.com/blog/659829Java代码@SuppressWarnings("serial")@Entity@Table(name="T_X")publicclassXimplementsSerializable{@Id@GeneratedValue(strategy=GenerationType.AUTO)privateintid;@Column(length=32)privat 阅读全文
摘要:
hibernate.cfg.xml 中hibernate.hbm2ddl.auto配置节点如下:<properties><property name="hibernate.show_sql" value="true" /> <property name="hibernate.hbm2ddl.auto" value="create" /></properties>Hibernate Reference Documentation 3.3.1解释如下:Automatica 阅读全文