map multiple properties as @Id properties:
映射的组合属性用@Id
/*the identifier type is then the entity class itself and needs to be Serializable
标识类型则是类的本事,它自己必须实现Serializable接口
This approach is unfortunately not standard and only supported by Hibernate
这种方式标准,但不幸的是,只有hibernate冬眠*/
本文介绍了一个名为Teacher2的Java实体类,该类使用了Hibernate框架进行数据库映射。Teacher2类通过注解定义了与数据库表Teacher_2的对应关系,并实现了Serializable接口。主要属性包括firstName、lastName和zhicheng,其中firstName和lastName被共同指定为@Id标识符。

393

被折叠的 条评论
为什么被折叠?



