Hibernate first-level cache test Analysis Hibernate cache is the session cache, this session non-HTTP session technology, can be understood as JDBC Connection, connection session, The session cache is a piece of memory space used to store mutually
about Hibernate:Hibernate is an open source framework, which is a framework for object-relational mapping, and it is a lightweight encapsulation of JDBC, and our Java programmers can manipulate the database using object-oriented thinking.Hibernate
Cache is the caching, it is often the most important means to improve the performance of the system, the data to play a reservoir and buffering role. The cache is especially important for systems that rely heavily on data-read operations. In the
Hibernate first-level cache test Analysis Hibernate cache is the session cache, this session non-HTTP session technology, can be understood as JDBC Connection, connection session, The session cache is a piece of memory space used to store mutually
I am a Java developer, hibernate, and MyBatis have studied, have been asked in the Java interview, also used in project practice, Now to hibernate and MyBatis to do a contrast, so that everyone better understanding and learning, so that they do in
@Entity // inheritance policy. Another class inherits this class, so the attributes in this class are applied to another class @Inheritance (strategy = inheritancetype.joined) @Table (name= "Infom_ TestResult ")publicclassextends identity{}1 @Entity
conceptual interpretation of 一、一级 cache level two cache
(1) First-level caching is the session-level cache, a session to do a query operation, it will put the results of this operation in a cache, if the short time this
Session (must be the same
first, Hibernate persistent object three kinds of States
The object of persistence class in Hibernate can be divided into three states, namely transient, persistent, and off-state.
1. Transient (Transient), also known as temporary state. Objects
Basic concepts of three states:
1, temporary State (Transient): Also called Free State, exists only in memory, and there is no corresponding data in the database. Object created with new, it is not persisted, is not in session, the object in this
Level 1 cache, level 2 cache, and lazy loading (transfer) in Hibernate, and level 1 cache in hibernate1. Why cache?
Hibernate uses cache to reduce the number of accesses to the database, thus improving the execution efficiency of hibernate. There
Hibernate caching Principle :Caching is especially important for an ORM such as Hibernate, which is the key to the performance improvement of the persistence layer. In short, hibernate is the encapsulation of JDBC to achieve internal state
Overview Greendao is a high-performance ORM framework in Android. (Other ormlite, etc.) Project address: Https://github.com/greenrobot/greenDAO Greendao also has a sub-item for Greendao Code Generator:The core classes of Greendao and their work are
Core development interface introduction and core development interface
Core development interface Introduction1. hibernate_0500_CoreAPI2, HiberanteAPI documentation needs to download the online api link: http://docs.jboss.org/hibernate/core/3.3/api3.
1 Public classThreeState {2 Public Static voidMain (string[] args) {3User U =NewUser ();//attribute: ID (corresponding database increment field), Name,age4U.setname ("CBIRDQ");5U.setage (20); 6 //heap memory has u,session cache without u,
Persistent objects have 3 states:1, persistent state 2, temporary State 3, Free StateThe specific method of the Session allows the object to transition from one state to anotherTemporary objects (transient)• OID is usually null in the case of using
Hibernate is an open source object-relational mapping framework that provides JDBC with a very lightweight object encapsulation that maps Pojo to database tables, is a fully automated ORM framework, and Hibernate automatically generates SQL
Hibernate we have been learning for four days, the knowledge we have finished, tomorrow's holiday, the day after day will end the study of hibernate, a little out of it, want to hibernate is not so difficult to say, The three more important concepts
1. In Hibernate, the following statement about the primary key generator is wrong ( C).A Increment can be used for primary keys of type long, short, or byteB Identity for databases that support identity columns such as SQL Server, DB2, MySQL, and so
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.