unique configuration of hibernate

In the hibernate configuration file, and some elements have a unique configuration of attributes, but I often see the abuse of the elements, especially those automatically generated hbm file tools often automatically generate the configuration, and generally do not understand developers the true meaning of hibernate configuration. the true meaning of unique is: when in the generation of DDL statements, will be used, in other words, if we have a database (this is very common), do not need to hbm files generated from the DDL statement, it does not need configuration of the property.

ps: http://blog.csdn.net/wangjian5748/archive/2006/09/19/1249890.aspx

In fact, unique in the data does not add any role, as was mentioned above, only in the hbm file generated from the ddl before the role statement, and will not check the data at runtime. Added to prevent the duplication of data, or in the database to create unique index (database to ensure that), or insertion in advance in check (human security). Of course, in most cases is a combination of both.

分类:Java 时间:2009-09-29 人气:532
blog comments powered by Disqus


  • Detailed Struts configuration file 2010-11-09

    <zt> http://blog.csdn.net/FutureInHands/archive/2006/11/15/1385681.aspx Struts framework reads when it starts its configuration file, according to it to create and configure the various Struts components. Struts configuration file allows developers

  • Linux file attributes and directory configuration 2011-06-14

    Linux command help command is the name of man in our Linux system, by default, all system user accounts and the general status, as well as the root of the information, are recorded in the / etc / passwd This file inside. The password is recorded in t

  • dwr configuration file dwr.xml 2009-06-26

    I dwr Chinese document on a collation do dwr.xml purely jobs they take, there are useful do not forget to top friend you, leave a contact with the exchange of learning! Welcome to my site to exchange technical www.ithuzhu.com dwr.xml is the DWR confi

  • Jetty6 Guide Book Chapter 4 Jetty service configuration file 2010-03-29

    EDITORIAL: Use the jetty has been a long time, it is a very good web containers and tools to share in this special jetty6 knowledge. Network, there are some information on the jetty, but it used outdated and does not have a systematic, resulting in a

  • maven2 configuration file pom.xml setting.xml 2010-02-04

    This article is mainly about maven2 core set of two documents with the understanding: pom.xml and setting.xml. pom.xml in folder to create the project, setting.xml maven package in the conf folder after extracting. Start with settings.xml, settings.x

  • dwr configuration file dwr.xml Explained (change) 2010-04-12

    dwr.xml is the DWR configuration file. By default, it should put it in WEB-INF directory (web.xml directory) to create dwr.xml file dwr.xml file is structured as follows: <dwr> <! - Init is only needed if you are extending DWR -> <init>

  • Detailed Struts2 configuration file - struts. Properties 2011-07-19

    This file is the struts2 framework of the global property file is automatically loaded file. This file contains a series of key-value pairs. This file can be configured entirely in struts.xml file, use the constant elements. Here is the file in some

  • DWR.xml configuration file specification 2009-05-24

    1, set up configuration files dwr.xml Dwr.xml any of the required documents are included in the statement DWR DOCTYPE line in the following format: <! DOCTYPE dwr PUBLIC "- / / GetAhead Limited / / DTD Direct Web Remoting 1.0 / / EN" "ht

  • Xiang Jie Struts configuration file, web.xml and struts-cofig.xml, as well as the struts-cofig.xml in the role of the various labels 2010-04-19

    Struts applications use two XML-based configuration files to configure, respectively web.xml and struts-cofig.xml file. Web.xml file is the configuration for all web applications, while the struts-config.xml file is struts-specific configuration file

  • Struts2 configuration file Xiangjie 2010-03-20

    This file is the struts2 framework of the global property file is automatically loaded file. This file contains a series of key-value pairs. The file can configured in struts.xml file, use the constant element. The following is the configuration file

iOS 开发

Android 开发

Python 开发



PHP 开发

Ruby 开发






Javascript 开发

.NET 开发



Copyright (C) codeweblog.com, All Rights Reserved.

CodeWeblog.com 版权所有 闽ICP备15018612号

processed in 0.048 (s). 13 q(s)