Three ways of querying hibernate

There are three main query modes common to hibernate: HQL, QBC (named query), and using native SQL query (SqlQuery) HQL Query * HQL (Hibernate Query Language) provides a rich and flexible way of querying, and using HQL for querying is also Hibernate's official recommended way of querying. * HQL is very similar in syntax structure to ...

Posted on Fri, 10 Jul 2020 11:22:31 -0400 by one

[Spring] Pure java for Spring-hibernate integration

First import the corresponding jar package for Spring-hibernate Then prepare the file for the database connectionHibernate.propertiesAlsoJdbc.properties Hibernate.propertiesFile: Configure the hibernate dialect and automatic table building hibernate.dialect=org.hibernate.dialect.H2Dialect hibernate.hbm2ddl.auto=create Jdbc.propertiesFi ...

Posted on Wed, 08 Jul 2020 10:43:00 -0400 by sineadyd

Java singleton design pattern

Article catalog 1. Introduction to single design mode 2. Eight ways of single design pattern 2.1 starved Chinese (static constant) step code implementation Advantages and disadvantages 2.2 starved Chinese (static code block) code implementation Advantages and disadvantages 2.3 lazy (unsafe threa ...

Posted on Sun, 21 Jun 2020 02:20:19 -0400 by davestevens_uk

The use of ThreadLocal in Java Concurrent Programming and source code analysis

The use of ThreadLocal in Java Concurrent Programming and source code analysis Create ThreadLocal and its operation Create ThreadLocal Perform the corresponding operation of ThreadLocal ThreadLocal initial value setting ThreadLocal delay setting ThreadLocal subclass InheritableThreadLocal ThreadLoc ...

Posted on Fri, 12 Jun 2020 03:08:19 -0400 by SueHubert

CGLIB dynamic agent mechanism has been written in all aspects

CGLIB library introduction The agent provides an extensible mechanism to control the access of the object. In fact, it adds a layer of encapsulation when the object is accessed. JDK has provided a dynamic proxy since version 1.3. It is very simple to use, but it has an obvious disadvantage: it requires the target object to implement one or more ...

Posted on Thu, 04 Jun 2020 04:48:56 -0400 by Tobeon

Hibernate Learning (5) Hibernate Many-to-Many Mapping

When it comes to the many-to-many relationship, the most impressive thing is the optional courses in universities.A student can take more than one course, a course can have more than one student, and each course he or she chooses has results.The E-R diagram for this scene is as follows: For many-to-many relationships, we usually pull out an in ...

Posted on Wed, 20 May 2020 12:38:45 -0400 by phpbeginner0120

Database Middleware - jdbi

Source: https://www.jianshu.com/p/1ee34c858cb9 Java's database uses jdbc natively, and there are many middleware, such as hibernate, mybatis, and jdbi, which are the most commonly used middleware. How to choose In general, if only one kind of database is always used, jdbc is the best choice. In this way, you can directly use the lowest leve ...

Posted on Wed, 20 May 2020 11:50:50 -0400 by sactown

Back end development: spring boot implements registration and login functions

This implementation of the registration and login function requires the basic operation of the database, and is the front and back-end separation development. Generally speaking, it is to design the database first, then write the API interface of the server according to the database, then come to the client or the mobile terminal to design the ...

Posted on Mon, 18 May 2020 21:08:01 -0400 by shlumph

(Reprint) SpringData JPA advanced - JPA one to many, many to many

Link: https://blog.csdn.net/qq_36662478/article/details/89111437   Primary key generation strategy in JPA                               .    four standard usages provided by JPA are ...

Posted on Fri, 08 May 2020 06:01:37 -0400 by tarscher

IoTClientTool Auto Upgrade Update

What is IoTClientTool IoTClientTool What's this, IoTClientTool yes IoTClient Implementation of visual operations for open source components.It is convenient to test and debug plc device, ModBusRtu, BACnet, serial port and other protocols. Package into single file exe Usually we develop WinForm programs, there are many dll files in addition to o ...

Posted on Wed, 06 May 2020 22:16:10 -0400 by twister47