突然发现hibernate发布官方examples程序了
在hibernate-examples这里可以看到,非常不错的
以前我看了别人的例子还是没有搞懂应该如何配置,这里就很清楚了
初学者值得推荐
我怎么也找不到关于Hibernate 继承和多态的例子, 不知大家是否知道?
请告之,谢谢!
http://hibernate.bluemars.net/hib_docs/reference/html/examples.html
如例子中的Cat,是不是配置好了后,数据库表会自动生成?不用自己手工建立吧?
hbm都已经说得那么明显了,还不能自动建吗?有什么关键难点不?
Parameters:
script - print the DDL to the console
export - export the script to the database
BTW,
<<如例子中的Cat,是不是配置好了后,数据库表会自动生成?不用自己手工建立吧?<<
首先自已建库,并且在hibernate.property中设置库,然后就可以用以上代码自动生成表了。