Hiberante reverse-generates database tables

1,hibernate.cfg.xml Comment out this section of configuration <!--Update database level automatically--> <!--<property name="hbm2ddl.auto">create</property>--> 2. New Generate Database Table Tool Class public class HibernateSchemaExport { static Session session; static Configuration ...

Posted by rigi2 on Sat, 18 Jul 2020 08:49:13 -0700

[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 by mjgdunne on Wed, 08 Jul 2020 07:43:57 -0700

Two implementation methods of java Dynamic agent

Last article we wrote about static agents Agent mode of design mode [1] static agent Let's talk about java's dynamic proxy today. 1, Why use dynamic proxy In fact, the dynamic agent makes up for the shortcomings of the static agent. The static agent needs to write a proxy class for each proxy object, ...

Posted by shiznatix on Sun, 28 Jun 2020 20:14:24 -0700

BaseModel based on ActiveAndroid framework

brief introduction Based on the ActiveAndroid framework, the Self-encapsulated BaseModel class, and some other operation classes simply need to inherit from BaseModel to have a method of database operation, which is very convenient to use. On how to use ActiveAndroid, I wrote in another of my blogs: http://blog.csdn.n ...

Posted by Misticx on Sun, 28 Jun 2020 09:56:14 -0700

Hibernate Validator - object grouping validation (probably the most comprehensive explanation in the old world)

Then I broke it down last time. I didn't see the children's shoes in the first chapter Click here Play back the content of the previous chapter Entity class @Data @AgeSalaryType public class Student { private Long id; @NotBlank(message = "Name cannot be empty") private String name; @ ...

Posted by apol on Fri, 19 Jun 2020 04:52:25 -0700

A preliminary solution to the working principle of spring framework

1: Basic concepts of spring 1) Struts 2 is web framework, hibernate is orm framework 2) spring is a container framework, which creates beans and maintains the relationship between beans 3) Spring can manage the web layer, persistence layer, business layer, dao layer, spring can configure the components of each layer, and maintain the relati ...

Posted by werty37 on Tue, 09 Jun 2020 23:13:17 -0700

Spring boot from scratch integrates spring data JPA to realize simple application

This paper introduces the simple application of spring boot integrating spring data JPA What is spring data jpa? We can't help thinking about it. In fact, spring data jpa uses hibernate by default and spring data jpa technology, which implements the template Dao layer. It only needs to inherit an interface in Dao to easily complete "add, d ...

Posted by k4pil on Fri, 22 May 2020 02:53:32 -0700

C#Data Operations Series - 10 NHibernate Trial

0. Preface In the last article, you basically completed the introductory tutorial for EF Core.Starting with this article, we'll try to explore more ORM frameworks on the.net core platform.So let's start with NHibernate. 1. Introduction to NHibernate NHibernate is the C#version of Hibernate, known as the pillar of ORM in Java (at least once).Hib ...

Posted by Josh18657 on Tue, 19 May 2020 18:04:34 -0700

Let hql support bitwise and operation

Absrtact: at present, hibernate does not support bitwise and operation, and recent projects need such operation again. Fortunately, hibernate provides related extension functions and can realize relevant operation by itself 1, Background In the work, MySQL is used as the database, java is used as the language of the p ...

Posted by goldages05 on Fri, 01 May 2020 13:39:48 -0700

Hibernate learning notes (6)

1, Object navigation query Previous relationships between customers and contacts were one to many: One to many Scenario: query the customer according to the customer id, and find out all contacts of the customer @Test public void selectTest(){ SessionFactory sessionFactory = null; Session session = null; Transacti ...

Posted by 01706 on Thu, 30 Apr 2020 11:07:51 -0700