When hql is used in Hibernate for query, list or Iterator is usually used to obtain the query results. Here we will briefly describe the differences between the two methods and applicable scenarios.
List: The queried results will be fully stored in
When Hibernate and the trigger in the database work together, there are two problems:
1) trigger: the data in the session cache is inconsistent with that in the database.
2) the update () method of the session blindly stimulates the trigger
Solution:
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
Session Status
The main runtime interface between Java applications and hibernate. It is the core abstract API class that abstracts the concept of persistent service.
The session lifecycle is bound to a physical transaction (tansaction. (Long
Have a nice smile"Wife wants to lose weight, let her husband help her buy diet pills, husband: Medicine health, now very good, more sensual ah." Son: Actually really a bit fat, the husband immediately stared at the son one eye: children don't know
recently made a Hibernate with the MyBatis, I hope you will point out the wrong place. Chapter I. Hibernate and MyBatisHibernate is currently the most popular O/R mapping framework, which comes from SF. NETand is now part of JBoss. Mybatis is
In hibernate there are three states, the deep understanding of it, to better understand the operation mechanism of hibernate, at first, not too much attention to these concepts, and later asked by others, said is the interview problem, only to find
Hibernate is very uncertain when writing database configuration files and must be tested to ensure the correctness of the database structure. So you can apply junit for testing.Using JUnit is very simple, and eclipse just needs to create a new junit
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 Two-level cache concept Interpretation
(1) A cache is the session level cache, a session to do a query operation, it will put the results of this operation in a first-level cache, if a short period of time this
Session (must be the
Here is the cascade operation of Hibernate's associated relationship, which is controlled using the Cascade property.Still use departments and employees for example, multiple employees corresponding to a department (many-to-one relationship)Employee
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
Hibernate the core ComponentsIn Java Web applications based on MVC design patterns, hibernate can be used as the model layer/data access layer. It maps a Java object or PO (persistent object, persisted object) to a database in a database through a
Hibernate requires the following States in his life cycle for Java objects to be persisted:1, temporary State (transient): Just created with the new statement, has not been persisted, not in the session cache. A Java object that is in a temporary
1,session Temp FileIn the server, the security and efficiency of the server can be reduced if all sessions of the user are saved to a temporary directory. Opening a server-stored site can be very slow.Using the PHP function Session_save_path ()
Start session-register session-use session-delete session
1. Start a session
Session_start ()
Use the session_register () function to create a session
The session_register () function is used to implicitly start a session by logging on to a variable
The first time I came into contact with hibernate was four years ago. Using myeclipse, I can directly generate object classes. I feel the magic of the framework. The most amazing thing is that I have never used hibernate since I used ibatis.
I have
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
Cascade: set the level of cascade operations.
Inverse: whether to discard the maintenance of cascade links.
The cascade attribute has the following values:
1. None: ignore other associated objects. Default Value.
2. Save-Update: when the
Understanding of cascade and inverse in hibernate.
Which hibernate book did you buy? Sun weiqin is proficient in hibernate, or is it just that hibernate...I have bought both of them. In general, it is okay. However, in some cases, it is relatively
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.