Back

Hibernate基础:annotation (Hibernate basic: annotation)

发布时间: 2012-09-06 08:31:00

使用HIBERNATE,面临一个问题:  pojo, xml , 数据库表,三个东西的内容都是一致的。
最笨的办法: 人肉一个一个去修改。
理想的办法: 修改一个,生成另外2个(我怀念RAILS)。 

这就要使用 hibernate annotation了。另外的选择还有xdoclet。不过那是几年前的技术了。不谈。

参考这个文章:http://docs.jboss.org/hibernate/annotations/3.5/reference/en/html_single/#setup-requirements

Back