JavaEE第9次.docVIP

  • 2
  • 0
  • 约4.17千字
  • 约 4页
  • 2018-03-29 发布于河南
  • 举报
JavaEE第9次

实验名称 使用JPA实现双向一对一关联映射 实验目的 用代码实现双向一对一关联映射 实验目的 用代码实现双向一对一关联映射。 实验内容及结果(请将相应题目代码和结果截图写在相应题目下方) .SQL语句: create table Husband ( id int not null auto_increment, name varchar(200), primary key (id) ); create table Wife ( id int not null, name varchar(20), primary key (id) ); alter table Wife add constraint FK_Reference_1 foreign key (id) references Husband (id) on delete restrict on update restrict; Wife.java语句: package com.softeem.jpa.one2one.bean; import java.io.Serializable; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistenc

文档评论(0)

1亿VIP精品文档

相关文档