Hibernate JPA @Column Description

Source: Internet
Author: User

JPA @Column Description

@Column (name= "ColumnName"; boolean unique () default False;boolean nullable () default True;boolean insertable () default True;boolean updatable () default true; String columndefinition () default ""; String table () default ""; int length () default 255;int precision () default 0; Decimal Precisionint scale () default 0; Decimal scalename Optional, field name (default value is property name) unique optional, whether to set a unique constraint on this field (the default value of false) nullable optional, whether to set the value of the field can be empty (default value false) Insertable Optionally, whether the field is a field in the resulting INSERT statement (the default is true) updatable optional, whether the field is a field in the generated UPDATE statement (the default value true) ColumnDefinition Optional: Overwrite the SQL DDL fragment for this specific field (this may result in the inability to migrate between different databases) Table optional, define the corresponding table (default is the primary table) length is optional, field length (default value 255) Precision optional, field numeric precision (default 0) scale is optional, If the field number scale is available, this setting (the default value of 0) for example: @Column (columndefinition= "int default 0", Nullable=false,insertable=false,updatable=false ) Integer enmenuvertag;//English dishes have been verified  //0: not verified   1: Verified @column (columndefinition= "varchar (255) Default ' x '", Nullable=false,insertable=false,updatable=false) String enmenuverid;//English food Check person @temporal (Temporaltype.timestamp) @ Column (Columndefinition= "timestamptz   default ' 2009-01-01 00:00:00 '", Nullable=false,insertable=false,updatable=false) Date enmenuvertime;//English Food Check Time



This article is from the "beautiful Dē‖java Question" blog, please be sure to keep this source http://teny32.blog.51cto.com/8027509/1654705

Hibernate JPA @Column Description

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.