As shown in the title , because maxResults For instance properties , Once revised , Will be applied to all queries !
Not very clear ,Spring Why dig this hole ?
My solution : To set the size of the returned result set , Through HibernateCallback To call native Session To achieve !
If you have a better solution , Please grant me your advice ,Thank You!
HibernateTemplate#setMaxResults() More related articles about the pit of
- Integrate Spring after HibernateTemplate Implement paging
spring Integrate hibernate When to use HibernateTemplate Paging is not supported , So you need to wrap a class for pagination , The specific implementation is as follows ... Use spring Of hibernateTemplate ...
- HibernateDaoSupport and HibernateTemplate
hibernateTemplate The common method of : Ø void delete(Object entity): Delete the specified persistent instance Ø deleteAll(Collection entities): Delete ...
- HibernateTemplate usage
private HibernateTemplate hibernateTemplate; Use HbernateTemplate HibernateTemplate Provide persistence layer access templating , Use Hibern ...
- HibernateTemplate and HibernateDaoSupport
Spring Integrate Hibernate after , by Hibernate Of DAO Two tool classes are provided :HibernateTemplate and HibernateDaoSupport HibernateTemplateHib ...
- HibernateTemplate Common methods
HibernateTemplate Provide a lot of common methods to complete the basic operation , Like the usual increase . Delete . modify . Query and so on ,Spring2.0 More on naming SQL Query support , Also increase the branch of pagination a . In most cases , send ...
- HibernateTemplate Use
HibernateTemplate Provides a lot of common methods to complete the basic operation , For example, increase . Delete . Modify and query operations ,Spring 2.0 More on naming SQL Query support , Also add support for paging . In most cases , ...
- 【private HibernateTemplate template;】 The role of
[private HibernateTemplate template;] The role of This is in spring A is defined in bean, It is org.springframework.orm.hibernate3. ...
- JPA Some pits
Recommend a better introduction JPA The article : Use Spring Data JPA simplify JPA Development JPA pit 1: I won't support it Limit Inquire about JPA It is not supported Limit Paging query , And sometimes we don't want to use it for some reason JPA Provide ...
- How to use it step by step DDD Design an e-commerce website ( Nine )—— Be careful to get stuck in the value object persistence pit
Read the directory Preface scene 1 Thinking scene 2 Thinking The way to avoid the pit practice Conclusion One . Preface In the last one ( How to use it step by step DDD Design an e-commerce website ( 8、 ... and )—— Integration of membership price ), Code with one line of comments : public interfa ...
Random recommendation
- php When uploading large files , Server side php.ini Options in the file that need additional modification
A few changes : 1.upload_max_filesize The largest file uploaded 2.post_max_size The largest file uploaded 3.max_execution_time It is amended as follows 0 No timeout , Have been waiting for 4.m ...
- A topological sort +Floyd(poj 1094)
subject :Sorting It All Out The question : Before the alphabet n Letters , Yes m The size of the group , Judge n Whether or not the letters constitute a unique sequence : 1.Sorted sequence determined after xxx ...
- AFURLRequestSerialization
NSString * AFPercentEscapedStringFromString(NSString *string) // Remove illegal characters and encode special characters . // Encode the string as a percentage ...
- The finger of the sword Offer—— Thunderbolt written test questions + Summary of knowledge points
The finger of the sword Offer-- Thunderbolt written test questions + Summary of knowledge points Situation review Time :2016.9.19 19:00-21:00 place : Shandong Key Laboratory of network environment intelligent computing technology event : Xunlei written test On the whole , The content of Xunlei written test is not much , The main ...
- Metasploit Framework(1) Basic commands 、 Easy to use
The format of the article may not be very nice , There's no reasonable order It's all about thinking and writing , But every aspect covers Friends who are able to look down are welcome to study together , Daniel and gang Jing, please make a detour Basic console command introduction : banner see metasp ...
- Scala - Fast learning 09 - Functional programming : Some operations
1- Collection classes (collection) The system distinguishes between variable and immutable sets . scala.collection All the collection classes in the package Variable set (Mutable) seeing the name of a thing one thinks of its function , It means you can modify , Remove or add an element . ...
- CentOS7 Install Chinese IME
CentOS7 Input Chinese , Open the terminal , Use administrator privileges su Enter the administrator password , enter Input yum install ibus-libpinyin enter , Wait patiently for the installation to complete , Then restart the system After the restart, proceed to the previous steps ...
- Google released T2T(Tensor2Tensor) Deep learning open source system
Google open source T2T model base , Deep learning system has entered the era of modularization ! Google brain subverts the chaos of deep learning , You need to learn the multiple tasks with the first mock exam https://github.com/tensorflow/models https://g ...
- idea Invalid source distribution : 8 resolvent
See connection for the solution http://blog.csdn.net/leixingbang1989/article/details/51985601 You can follow my public account Internet developers Club, Public accounts share personalities ...
- bootstrap Of carousel Picture carousel
The entire carousel is put in one div .carousel and .slide Of div Medium , Include 3 Parts of : 1. The first part indicator The indicator section below . The structure is a problem ol and li, ol The class is carousel- ...