hibernate中创建一对一映射关系

1.在model层创建两个类Person,IdCard

2.配置对应的xml配置文件

person的配置文件

idCard的配置文件

 3.测试

运行测试程序后,控制台输出两条语句

原文地址:https://www.cnblogs.com/wangqun1234/p/8283545.html