hibernate some understanding of the concept (to be continued)

sponsored links
hibernate.hbm2ddl.auto = create.
Usually you only leave it turned on in continuous unit testing, but another run of hbm2ddl would drop everything you have stored - the create configuration setting actually translates into "drop all tables from the schema, then re-create all tables, when the SessionFactory is build ".
Can see that it is deleted and rebuilt, I do not understand is that the reconstruction, while there is clear, it appears that is not right.

We recommend you declare consistently-named identifier properties on persistent classes. We further recommend that you use a nullable (ie. non-primitive) type.
Why not to recommend our basic types of settings that? Do not know. . . . . . It seems also need to master the interpretation, especially those who read the source code. . . . . . . .

Properties need not be declared public - Hibernate can persist a property with a default, protected or private get / set pair.
This benefited from the java functions provide a powerful reflection.
  • del.icio.us
  • StumbleUpon
  • Digg
  • TwitThis
  • Mixx
  • Technorati
  • Facebook
  • NewsVine
  • Reddit
  • Google
  • LinkedIn
  • YahooMyWeb

Related Posts of hibernate some understanding of the concept (to be continued)

  • [Have resolved] how to give rails of the model class of congestive (include / extent module)

    Has been resolved Please visit: http://henrik.nyh.se/2008/02/rails-model-extensions 1: the introduction of new features to the controller My approach: I tried to introduce in the application controller extra modules: require "string" This "string

  • hibernate study of the second

    Persistence of three main points: 1, a statement for persistent fields accessors (accessors) and whether the variable signs (mutators) Property statement is not necessarily required for the public's. Hibernate can be default, protected or private ...

  • hibernate the third study (mapping file configuration)

    If you do not want to use the default hibernate.cfg.xml file as a configuration file, we can also specify the configuration file name: File file = new File ( "C: \ \ myhibernate.xml"); Configuration config = new Configuration (). Configure (file

  • Hibernate configuration parameter table

    # # Auto schema export # hibernate.hbm2ddl.auto create-drop # hibernate.hbm2ddl.auto create # hibernate.hbm2ddl.auto update # hibernate.hbm2ddl.auto validate The first is to create a table in the delete the original data, we can insert data, delete p ...

  • Hibernate primary key strategy-sequence

    Today, the use of hibernate in the company encountered a troublesome problem, the use of hibernate when the primary key generation strategy set sequence, but always reported in the implementation could not get next sequence value of the error, then o ...

  • Memo hibernate problem

    hibernate using myeclipse automatically generated HBM mapping file will be schema ="***" catalog ="***" Separately are the database instance name and database name, but in fact has been stated jdbc url connection database, are the ...

  • JAVA interview questions

    JAVA interview questions 1, object-oriented features of what has 1. Abstract 2. Inheritance 3. Packaging 4. Polymorphisms 2, String data types are the most basic right? Basic data types include byte, int, char, long, float, double, boolean and short. java

  • WebQQ, ExtJs + Servlet + Hibernate + Spring implementation

    Code for the development of boredom when using ExtJs + Servlet + hibernate (Ant + xdoclet generate HBM files) + spring implementation, Pure whim, but implementation has been more than chat, group chat, what's not achieve, nor how to consider the perfo

  • Spring + Hibernate to use Glassfish Database Connection Pool

    applicationContext.xml file content <? xml version = "1.0" encoding = "UTF-8"?> <beans xmlns = " http://www.springframework.org/schema/beans " xmlns: xsi = " http://www.w3.org/2001/XMLSchema-instance " ...

  • Spring2.0 + hibernate3.1 + log4j + mysql demo

    applicationContext.xml Non-attachment jar package, necessary friends can send an email to todd.liangt @ gmail.com

blog comments powered by Disqus
Recent Entries
Tag Cloud
Random Entries