say i have the class user, and we want to map it to our database. piece of cake so far - here is our main bootstrap test class: 【程序编程相关:Linux on the Desktop】
before i get too far ahead of myself, however, let me explain what i want to achieve. what i would like to explain in this tip is how to map inheritence of your beans with varying tables in your database. the comprehensive details of hibernate inheritence mapping can be found at this url: http://www.hibernate.org/hib_docs/v3/reference/en/html/inheritance.html - today ill be discussing inheritence mapping of the variety table per subclass, using a discriminator . while each type of mapping has its various advantages and disadvantages, i am describing the table with discriminator variety here because it is the implementation i see most often in legacy applications not using hibernate (it seems to be fairly common) - and you may have a need for it. the variety that doesnt have a discriminator is easier anyway, so this example describes more than enough for you to try the recommended hibernate format - table per subclass - no discriminator - if you so wish). 【推荐阅读:Integrating Java Ope】
... 下一页