Hibernate (III) openSession and getCurrentSession

1, OID, HQL, SQL, QBC operations 1.1 ibernate has four operation modes, namely OID, HQL, QBC and SQL.   OID: object identifier. Hibernate is used to mark the unique object. In fact, it is the primary key Available operations: add, delete, modify and query For example, we often use save, update, delete, get, load, saveOrUpdate and other m ...

Posted on Sun, 29 Mar 2020 11:52:57 -0700 by buddhika2010

Fault analysis of row based dual master master replication Err 1677

1, Error message Recently, the project implementation colleagues upgraded the system and changed a field of test.test tab T1. The SQL statement is as follows: ALTER TABLE TEST.TEST_TAB_T1 MODIFY BXXX VARCHAR(200);   After the system upgrade of the project, the MySQL master-slave synchronization error is reported as follows: mysql>show slave ...

Posted on Sun, 29 Mar 2020 11:21:13 -0700 by gaz_hayes

. NET execute SQL performance optimization I: execute SQL statements in batches for SQL Server

This paper introduces several techniques for executing multiple SQL statements with one SqlCommand. introduce One of the functions that are often ignored in data storage of SQL Server using ADO.NET is that it can execute multiple SQL statements SqlCommand with a single statement. In general, programs execute statements and / or call stored pro ...

Posted on Sun, 29 Mar 2020 10:12:46 -0700 by csueiras

Use of Druid connection pool

Druid introduction Druid is Alibaba's open-source database connection pool. As a rising star, Druid has higher performance than dbcp and c3p0, and is used more and more widely.     druid benefits High performance. The performance is much higher than dbcp and c3p0. As long as it is a database supported by jdbc, Druid supports it and has good su ...

Posted on Sun, 29 Mar 2020 07:58:17 -0700 by gowni

java uses JDBC to connect to mysql database

Personal home page: https://zhangquan1995.github.io Here the JDK version of java is 1.8.0X and the mysql version is 5.7. mysql has a user name of root and a password of zhang110. Download JDBC driver Download the JDBC driver mysql-connector-java-5.1.46.zip and unzip it to the installation directory of Java (any path will ...

Posted on Sat, 28 Mar 2020 10:54:47 -0700 by lalov1

Android gets the pit of pictures in the gallery

Recently, a function has been implemented to upload data to the background of the server for the pictures taken or the pictures in the gallery. It's OK to take pictures, but the pictures in the gallery can't get files. Now record your own pit. My code implementation //Select from the album private void choseHeadImage ...

Posted on Fri, 27 Mar 2020 07:49:17 -0700 by cheesehead

thinkphp+jquery to achieve two-level comment reply effect

This is not an infinite level comment, but only two levels. It's easy to implement. The parent id of all comments is the id of the corresponding first level comment. When adding a comment, add it under the corresponding comment, and put the latest comment in the front with prepend()     Database design (I don't really use the database here. In ...

Posted on Wed, 25 Mar 2020 07:42:15 -0700 by shadownet

thinkphp+jquery to achieve two-level comment reply effect

This is not an infinite level comment, but only two levels. It's easy to implement. The parent id of all comments is the id of the corresponding first level comment. When adding a comment, add it under the corresponding comment, and put the latest comment in the front with prepend()     Database design (I don't really use the database here. In ...

Posted on Wed, 25 Mar 2020 07:43:17 -0700 by prometheuzz

JPA object inheritance relationship

In the process of entity modeling, some entities will have many kinds of deformations, most of which are common, only a small part is unique. At this time, the more elegant design is to abstract the shared attributes to form a base class, and then the implementation class extends the unique attributes. Domain services can abstract common servic ...

Posted on Wed, 25 Mar 2020 05:18:10 -0700 by dancahill

Redis Cluster Set Up Complete Process Demo

Preface This article is intended to locally simulate the process of building a redis server cluster. What is the role of a Redis cluster? Before experimenting with deployment, we need to understand why we need to set up a Redis cluster and what problems did it solve?What are the advantages?We can explore this issue from a single Redis server. ...

Posted on Tue, 24 Mar 2020 09:57:31 -0700 by jlh3590