shop++ JPA Annotations Detailed

Source: Internet
Author: User

@NotEmpty: Cannot be "" and cannot be an empty collection.

@Column (nullable = false, updatable = false, unique = true)
Indicates that the column cannot be empty, cannot be modified, and the only

@Lob Large storage fields

@NotNull (groups = ValidationService.Save.class)
The save is not allowed to be empty, the update is allowed to be empty, indicating that the field is not updated.
@Field design a tag for an index
Name indicates the moniker of the tag
Store indicates whether storage is
Index indicates how indexes are indexed
Index.no indicates that no index is established
Index.no_norms No analysis of established indexes, no lookup
Index.tokenized do not parse the established index, can be searched
Index.un_tokenized an index created without a word breaker, it can be searched
Analyzer means all the word breakers
Fieldbridge is sometimes indexed, not the basic type, this, is a data bridge processing

@JsonProperty: Serialization/deserialization

@Field (store = store.yes, index = index.un_tokenized)
@Field: Declare that a domain can be indexed
Store. Yes: The value of the domain is saved to Lucene index, but it takes a larger amount of hard disk space.
index = index.un_tokenized: does not need to be parsed by the parser, the value of the entire domain as the index value

@Column (name = "Price", precision = +, scale = 6)
Precision data accuracy, scale decimal digits

Mappedby: The maintenance party can automatically maintain the relationship of the maintenance party. Entity class attribute name of the maintained party configured in the entity class of the content maintainer

Cascade = cascadetype.remove: Cascade Delete, only when the delete operation, the association table will have an impact. (Delete the association ID from the table before deleting the associated table).

@JoinTable: Describes the data table relationship for many-to-many relationships, the Name property specifies the intermediate table names,

shop++ JPA Annotations Detailed

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.