In the actual development process, many users need to sort and display the query results as needed, instead of displaying the results in a disordered order in the database, in this case, we have to sort the data. hibernate provides good support for data sorting. hibernate provides two types of sorting for the queried data results: 1: Database sorting, that is to say, the sorting is completed within the data
Welcome to other blogs on this topic:
About hibernate (10) Hibernate query sorting and component ing
Hibernate (11) hibernate composite primary key ing
Talk about hibernate (12) Hibernate query sorting component ing
Session ca
to set the number of bulk searches for a deferred retrieval policy or an immediate retrieval policy. Bulk retrieval can reduce the number of SELECT statements and improve the performance of deferred or immediate retrieval operations. 4. Multiple-to-one and single-to-a-link retrieval strategies1) As with 2) If the Fetch attribute is set to join, then the Lazy property is ignored 3) The advantage of an urgent left outer connection retrieval strategy is that fewer SELECT statements are used
PairIn hibernate, set attributes are very common and important in hibernate ing files. It is more important to understand and master common set attributes. In the hibernate configuration file, for example, each person's test score is a typical map structure, and each course corresponds to a score. Or a simpler set of attributes, the department of an enterprise, 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 state is called a temporary object.2, persistent State (persistent): Has been persisted, added to the session, in the
In the object-oriented programming field, classes and classes have an inheritance relationship. For example, in the Java World, only the extends keyword is required to determine the parent-child relationship of these two classes, however, in the world of relational databases, there is no keyword between tables to clearly specify the parent-child relationship between the two tables. There is no inheritance relationship between the tables. To reflect th
In the field of Object-oriented programming, a class is inherited from a class, such as a parent-child relationship in the Java world that requires only the extends keyword to determine the two classes, but in the world of relational databases, there are no keywords between tables and tables that explicitly indicate the parent-child relationship between the two tables. Tables and tables are not inherited from this argument. In order to reflect the inh
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 the project more handy. The first aspect: comparison of development spee
In the past few days, a part-time employee's information entry system has encountered an error where hibernate cannot query the specified condition data. Now we can find a solution:
The error message is as follows:HTTP status 500-
--------------------------------------------------------------------------------
Type exception report
Message
Description the server encountered an internal error () that prevented it from fulfilling this request.
Exception
, in fact, do not worry, you just need to download a complete final package, all the necessary jar inside. After downloading the final package, unzip the directory such as:Hibernate includes a total of 23 jar packs, dazzling. This article will explain in detail the role of each jar package in hibernate, so that you can make your own choices in your application.To download hibernate, for example 3.6.1 stable
"quality of production" data model, we will need foreign keys, indexes, extra fields, and so on. For this tutorial, the data model above is OK.
Java Code
While these business requirements are simple and easy to understand, the traditional way to write a bunch of prepared statements is quickly annoying. And hibernate will liberate us. All we need is a simple set of mapping files. But first we need t
can specify the fields of the query on demand. The tuning of Hibernate HQL statements requires that SQL be printed out, and Hibernate's SQL is too ugly for many people to dislike. MyBatis's SQL is written manually, so it's easy to adjust. However, hibernate has its own log statistics. The mybatis itself does not have log statistics and uses log4j to log records.Extensibility aspectsHibernate's association
Java Enterprise Application-Hibernate practical full solution-general Linux technology-Linux programming and kernel information, the following is a detailed description. Bromon originality, please respect copyright
Object Relative ing (ORM) is a hotspot in object-oriented development. It is used to solve the complexity and inconvenience of manual OR ing during JDBC development. The Entity Bean in EJB is we
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 Core InterfaceSession: Responsible for persistent object CRUD operationsSessionfactory: Responsible for initializing hibernate, creating Session ObjectConfigurati
Hibernate needs the jar package1)Hibernate3.jar: Hibernate core Library, nothing to say, must use the JAR package2)Cglib-asm.jar: Cglib Library, Hibernate uses it to achieve the dynamic generation of PO bytecode, very core library, must use the JAR package3)Dom4j.jar: dom4j is a Java XML API, similar to Jdom, used to r
varchar2 (50), birthday date, sex char (1), salary number (8, 2 )); -- add comments to the columns comment on column tmp_emp.id is 'Primary key id'; Comment on column tmp_emp.name is 'name'; Comment on column tmp_emp.birthday is 'date '; comment on column tmp_emp.sex is 'gender (f female, M male) '; Comment on column tmp_emp.salary is 'wage'; -- create/recreate primary, unique and foreign key constraints alter table tmp_emp add constraint pk_tmp_emp_id primary key (ID); -- create sequence sq_tm
QuickStart | Project Java Open source project Hibernate QuickStart In fact, the hibernate itself is a stand-alone framework that does not require the support of any Web server or application server. However, most hibernate introductory introductions have added a lot of hibernate
Hibernate and MyBatis have studied, in the Java interview is also mentioned asked, in the project practice has also been used, now to hibernate and MyBatis to do a contrast, so that everyone better understanding and learning, so that they do more handy in the project.The first aspect: comparison of development speedIn terms of development speed, Hibernate's real
piece of data, which applies to data that is often read but rarely updated* Transactional: This strategy is a fully transactional cache strategy, can be used in JTA environment 7, hibernate inside the sorted collection and ordered collection what is the difference
Sorted collection is sorted in memory through the Java comparerThe ordered collection is the 8, hibernate
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.