2014年1月12日

Hibernate component mapping

摘要: A Component is a containted object that is be persisted value type and not an entity.But you canembedthe component to entity.Now We need one-to-one association for husband an wife. We just let the in one table. Then we create one entity, on component.such as this:Entity Husband: 1 @Entity 2 public c 阅读全文
posted @ 2014-01-12 11:39 andyOS 阅读(271) 评论(0) 推荐(0)

Hibernate a bidirectional one-to-one association on a foreign key

摘要: Use hibernate create bidirectional one-to-one asscocition on a foreign .The tables' structural is the same as unidirectional one-to-one association on a foreign key tables.But, the application code is not the same as that.Unidirectional one-to-one assciation is a tableassociationanother Unidirec 阅读全文
posted @ 2014-01-12 10:55 andyOS 阅读(251) 评论(0) 推荐(0)