Original address codergo:http://leekai.me/?p=219 introduction
For the JVM, the state of the Java object is simple, a new object created by new, a garbage object that is not referenced by any object, and for garbage objects, the JVM reclaims it at
Get and load mode is a record based on IDThe difference between get and load is detailed below, because sometimes it is added in order to compare.1. Compare the results from the return:A Org.hibernate.ObjectNotFoundException exception is thrown if
Hibernatetemplate provides a number of common ways to perform basic operations such as adding, deleting, modifying, and querying, and Spring 2.0 adds support for named SQL queries, as well as paging support. In most cases, the CRUD operations of
Basic concepts of three states:1, transient 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
If you use the Load method, Hibernate believes that the object (database record) corresponding to the ID must exist in the database, so it can be used with confidence, and it can safely use the proxy to delay loading the object. The database is
Hibernate Session OverviewThe session interface is the primary interface that hibernate provides to the application to manipulate the database, which provides a basic way to save, update, delete, and load Java objects.The session has a cache, and
In hibernate there are three states, in-depth understanding of it in order to better understand the operating mechanism of hibernate, at first, not too much attention to these concepts, and later found that it is important. A better understanding of
Caching is between an application and a physical data source, and it is designed to reduce the frequency of application access to physical data sources, thereby improving the performance of the application. The data in the cache is a copy of the
After ssl is configured in Apache, HTTPS is still unavailable. Httpd-ssl.conf configuration {code...} Apache still cannot be accessed with HTTPS After configuring ssl, using a free wootong certificate.
Httpd-ssl.conf Configuration
## This is the
Basic concepts of three states:1. Temporary identity (Transient): Also known as Free State, it exists only in memory, and there is no corresponding data in the database.Object created with new, long, not in session, the object in this state is
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
Caching is between an application and a physical data source, and it is designed to reduce the frequency of application access to physical data sources, thereby improving the performance of the application. The data in the cache is a copy of the
Start a session? Register a session? Use a session? Delete a session
1. Start the session
Session_Start ()
Creating a session with the Session_register () function
The Session_register () function is used to login a variable
The cache is between applications and physical data sources. It is used to reduce the frequency of applications accessing physical data sources and improve the running performance of applications. Number of cached instances
The cache is between
In hibernate, the session. Load/get method can read records from the database based on the specified object class and ID, and return the corresponding object. The difference is:
1. The get () method returns the object class directly. The load ()
The cache is between applications and physical data sources. It is used to reduce the frequency of applications accessing physical data sources and improve the running performance of applications. Data in the cache is the replication of data in the
My English skills are not high. Please point out the mistakes in translation. Smile at the translation.
It is mainly for you to see, so you know what it means. There must be a lot of bad words.
UsageUsage
Table of
From the perspective of the persistence layer, a java object can be in one of the following four states in its lifecycle:
Temporary status (transient): It was just created with the new statement and has not been persisted and is not in the Session
Java interview-Hibernate summary, java interview-hibernate
1. Hibernate Retrieval Method
Ø navigation object graph retrieval (navigation to other objects based on the loaded objects .)
OID retrieval (the object is retrieved Based on the OID of the
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.