JAVA-18167 Upgrade persistence-modules to JDK 11 (#13714)
* JAVA-18167 Upgrade persistence-modules to JDK 11 (activejdbc and core-java-persistence) * JAVA-16167 Update pom.xml to include just the updated modules * JAVA-18167 Added vaadin because it looks that I removed * JAVA-18167 Migration deltaspike * JAVA-18167 Migration hbase module * JAVA-18167 Migration hibernate-mapping-2 * JAVA-18167 Migration hibernate-exceptions * JAVA-18167 Migration hibernate-jpa module * JAVA-18167 Migration hibernate-jpa change the name of User entity * JAVA-18167 Overwriting the version of slf4j and logback for hibernate-jpa * JAVA-18167 Migrate deltaspike back to jdk8 * JAVA-18167 Remove some modules that was added elsewhere * Revert "JAVA-18167 Migration deltaspike" This reverts commit 874b4ba2 * JAVA-18167 Comment failed module (it will be migrated later) --------- Co-authored-by: timis1 <noreplay@yahoo.com>
This commit is contained in:
parent
3051d4ba97
commit
84a3a42fd0
|
@ -89,6 +89,7 @@ spring-soap/src/main/java/com/baeldung/springsoap/gen/
|
|||
/report-*.json
|
||||
transaction.log
|
||||
*-shell.log
|
||||
customers.xml
|
||||
|
||||
apache-cxf/cxf-aegis/baeldung.xml
|
||||
testing-modules/report-*.json
|
||||
|
|
|
@ -74,9 +74,9 @@
|
|||
</build>
|
||||
|
||||
<properties>
|
||||
<activejdbc.version>2.0</activejdbc.version>
|
||||
<activejdbc.version>3.4-j11</activejdbc.version>
|
||||
<environments>development.test,development</environments>
|
||||
<mysql.connector.version>5.1.34</mysql.connector.version>
|
||||
<mysql.connector.version>8.0.32</mysql.connector.version>
|
||||
</properties>
|
||||
|
||||
</project>
|
|
@ -4,6 +4,7 @@ package com.baeldung;
|
|||
import com.baeldung.model.Employee;
|
||||
import com.baeldung.model.Role;
|
||||
import org.javalite.activejdbc.Base;
|
||||
import org.javalite.activejdbc.DB;
|
||||
import org.javalite.activejdbc.LazyList;
|
||||
import org.javalite.activejdbc.Model;
|
||||
|
||||
|
@ -11,8 +12,7 @@ public class ActiveJDBCApp
|
|||
{
|
||||
public static void main( String[] args )
|
||||
{
|
||||
try {
|
||||
Base.open();
|
||||
try(final DB open = Base.open()) {
|
||||
ActiveJDBCApp app = new ActiveJDBCApp();
|
||||
app.create();
|
||||
app.update();
|
||||
|
|
|
@ -52,14 +52,21 @@
|
|||
<artifactId>spring-boot-starter</artifactId>
|
||||
<version>${springframework.boot.spring-boot-starter.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
<version>${mysql-connector.version}</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<properties>
|
||||
<commons-dbcp2.version>2.4.0</commons-dbcp2.version>
|
||||
<HikariCP.version>3.2.0</HikariCP.version>
|
||||
<c3p0.version>0.9.5.2</c3p0.version>
|
||||
<springframework.boot.spring-boot-starter.version>1.5.8.RELEASE</springframework.boot.spring-boot-starter.version>
|
||||
<springframework.spring-web.version>4.3.4.RELEASE</springframework.spring-web.version>
|
||||
<commons-dbcp2.version>2.9.0</commons-dbcp2.version>
|
||||
<HikariCP.version>5.0.1</HikariCP.version>
|
||||
<c3p0.version>0.9.5.5</c3p0.version>
|
||||
<springframework.boot.spring-boot-starter.version>3.0.4</springframework.boot.spring-boot-starter.version>
|
||||
<springframework.spring-web.version>6.0.6</springframework.spring-web.version>
|
||||
<mysql-connector.version>8.0.32</mysql-connector.version>
|
||||
</properties>
|
||||
|
||||
</project>
|
|
@ -1,13 +1,14 @@
|
|||
package com.baeldung.jdbcmetadata;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.DriverManager;
|
||||
import java.sql.SQLException;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class DatabaseConfig {
|
||||
private static final Logger LOG = Logger.getLogger(DatabaseConfig.class);
|
||||
private static final Logger LOG = LoggerFactory.getLogger(DatabaseConfig.class);
|
||||
|
||||
private Connection connection;
|
||||
|
||||
|
@ -17,7 +18,7 @@ public class DatabaseConfig {
|
|||
String url = "jdbc:h2:mem:testdb";
|
||||
connection = DriverManager.getConnection(url, "sa", "");
|
||||
} catch (ClassNotFoundException | SQLException e) {
|
||||
LOG.error(e);
|
||||
LOG.error(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -35,7 +36,7 @@ public class DatabaseConfig {
|
|||
connection.createStatement().executeUpdate("create table CUSTOMER (ID int primary key auto_increment, NAME VARCHAR(45))");
|
||||
connection.createStatement().executeUpdate("create table CUST_ADDRESS (ID VARCHAR(36), CUST_ID int, ADDRESS VARCHAR(45), FOREIGN KEY (CUST_ID) REFERENCES CUSTOMER(ID))");
|
||||
} catch (SQLException e) {
|
||||
LOG.error(e);
|
||||
LOG.error(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -43,7 +44,7 @@ public class DatabaseConfig {
|
|||
try {
|
||||
connection.createStatement().executeUpdate("CREATE VIEW CUSTOMER_VIEW AS SELECT * FROM CUSTOMER");
|
||||
} catch (SQLException e) {
|
||||
LOG.error(e);
|
||||
LOG.error(e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
package com.baeldung.jdbcmetadata;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import java.sql.SQLException;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class JdbcMetadataApplication {
|
||||
|
||||
private static final Logger LOG = Logger.getLogger(JdbcMetadataApplication.class);
|
||||
private static final Logger LOG = LoggerFactory.getLogger(JdbcMetadataApplication.class);
|
||||
|
||||
public static void main(String[] args) {
|
||||
DatabaseConfig databaseConfig = new DatabaseConfig();
|
||||
|
|
|
@ -5,10 +5,6 @@ import java.sql.DriverManager;
|
|||
import java.sql.SQLException;
|
||||
import java.sql.Statement;
|
||||
|
||||
import javax.sql.rowset.JdbcRowSet;
|
||||
import javax.sql.rowset.RowSetFactory;
|
||||
import javax.sql.rowset.RowSetProvider;
|
||||
|
||||
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
|
|
|
@ -7,8 +7,6 @@ import java.sql.ResultSetMetaData;
|
|||
import java.sql.SQLException;
|
||||
import java.sql.Statement;
|
||||
|
||||
import com.sun.rowset.*;
|
||||
|
||||
import javax.sql.rowset.CachedRowSet;
|
||||
import javax.sql.rowset.FilteredRowSet;
|
||||
import javax.sql.rowset.JdbcRowSet;
|
||||
|
@ -25,7 +23,7 @@ public class JdbcRowsetApplication {
|
|||
|
||||
public static void main(String[] args) throws Exception {
|
||||
SpringApplication.run(JdbcRowsetApplication.class, args);
|
||||
Statement stmt = null;
|
||||
Statement stmt;
|
||||
try {
|
||||
Connection conn = DatabaseConfiguration.geth2Connection();
|
||||
|
||||
|
@ -41,8 +39,7 @@ public class JdbcRowsetApplication {
|
|||
DatabaseConfiguration.initDatabase(stmt);
|
||||
// JdbcRowSet Example
|
||||
String sql = "SELECT * FROM customers";
|
||||
JdbcRowSet jdbcRS;
|
||||
jdbcRS = new JdbcRowSetImpl(conn);
|
||||
JdbcRowSet jdbcRS = RowSetProvider.newFactory().createJdbcRowSet();
|
||||
jdbcRS.setType(ResultSet.TYPE_SCROLL_INSENSITIVE);
|
||||
jdbcRS.setCommand(sql);
|
||||
jdbcRS.execute();
|
||||
|
@ -58,7 +55,8 @@ public class JdbcRowsetApplication {
|
|||
String username = "sa";
|
||||
String password = "";
|
||||
String url = "jdbc:h2:mem:testdb";
|
||||
CachedRowSet crs = new CachedRowSetImpl();
|
||||
RowSetFactory aFactory = RowSetProvider.newFactory();
|
||||
CachedRowSet crs = aFactory.createCachedRowSet();
|
||||
crs.setUsername(username);
|
||||
crs.setPassword(password);
|
||||
crs.setUrl(url);
|
||||
|
@ -74,7 +72,7 @@ public class JdbcRowsetApplication {
|
|||
}
|
||||
|
||||
// WebRowSet example
|
||||
WebRowSet wrs = new WebRowSetImpl();
|
||||
WebRowSet wrs = RowSetProvider.newFactory().createWebRowSet();
|
||||
wrs.setUsername(username);
|
||||
wrs.setPassword(password);
|
||||
wrs.setUrl(url);
|
||||
|
@ -84,14 +82,14 @@ public class JdbcRowsetApplication {
|
|||
wrs.writeXml(ostream);
|
||||
|
||||
// JoinRowSet example
|
||||
CachedRowSetImpl customers = new CachedRowSetImpl();
|
||||
CachedRowSet customers = aFactory.createCachedRowSet();
|
||||
customers.setUsername(username);
|
||||
customers.setPassword(password);
|
||||
customers.setUrl(url);
|
||||
customers.setCommand(sql);
|
||||
customers.execute();
|
||||
|
||||
CachedRowSetImpl associates = new CachedRowSetImpl();
|
||||
CachedRowSet associates = aFactory.createCachedRowSet();
|
||||
associates.setUsername(username);
|
||||
associates.setPassword(password);
|
||||
associates.setUrl(url);
|
||||
|
@ -99,7 +97,7 @@ public class JdbcRowsetApplication {
|
|||
associates.setCommand(associatesSQL);
|
||||
associates.execute();
|
||||
|
||||
JoinRowSet jrs = new JoinRowSetImpl();
|
||||
JoinRowSet jrs = RowSetProvider.newFactory().createJoinRowSet();
|
||||
final String ID = "id";
|
||||
final String NAME = "name";
|
||||
jrs.addRowSet(customers, ID);
|
||||
|
|
|
@ -19,11 +19,6 @@ import javax.sql.rowset.WebRowSet;
|
|||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
import com.sun.rowset.CachedRowSetImpl;
|
||||
import com.sun.rowset.JdbcRowSetImpl;
|
||||
import com.sun.rowset.JoinRowSetImpl;
|
||||
import com.sun.rowset.WebRowSetImpl;
|
||||
|
||||
public class JdbcRowSetLiveTest {
|
||||
Statement stmt = null;
|
||||
String username = "sa";
|
||||
|
@ -51,9 +46,10 @@ public class JdbcRowSetLiveTest {
|
|||
public void createJdbcRowSet_SelectCustomers_ThenCorrect() throws Exception {
|
||||
|
||||
String sql = "SELECT * FROM customers";
|
||||
JdbcRowSet jdbcRS;
|
||||
Connection conn = DatabaseConfiguration.geth2Connection();
|
||||
jdbcRS = new JdbcRowSetImpl(conn);
|
||||
JdbcRowSet jdbcRS = RowSetProvider.newFactory().createJdbcRowSet();
|
||||
jdbcRS.setUrl("jdbc:h2:mem:testdb");
|
||||
jdbcRS.setUsername("sa");
|
||||
jdbcRS.setPassword("");
|
||||
jdbcRS.setType(ResultSet.TYPE_SCROLL_INSENSITIVE);
|
||||
jdbcRS.setCommand(sql);
|
||||
jdbcRS.execute();
|
||||
|
@ -71,7 +67,7 @@ public class JdbcRowSetLiveTest {
|
|||
@Test
|
||||
public void createCachedRowSet_DeleteRecord_ThenCorrect() throws Exception {
|
||||
|
||||
CachedRowSet crs = new CachedRowSetImpl();
|
||||
CachedRowSet crs = RowSetProvider.newFactory().createCachedRowSet();
|
||||
crs.setUsername(username);
|
||||
crs.setPassword(password);
|
||||
crs.setUrl(url);
|
||||
|
@ -91,7 +87,7 @@ public class JdbcRowSetLiveTest {
|
|||
@Test
|
||||
public void createWebRowSet_SelectCustomers_WritetoXML_ThenCorrect() throws SQLException, IOException {
|
||||
|
||||
WebRowSet wrs = new WebRowSetImpl();
|
||||
WebRowSet wrs = RowSetProvider.newFactory().createWebRowSet();
|
||||
wrs.setUsername(username);
|
||||
wrs.setPassword(password);
|
||||
wrs.setUrl(url);
|
||||
|
@ -105,14 +101,14 @@ public class JdbcRowSetLiveTest {
|
|||
@Test
|
||||
public void createCachedRowSets_DoJoinRowSet_ThenCorrect() throws Exception {
|
||||
|
||||
CachedRowSetImpl customers = new CachedRowSetImpl();
|
||||
CachedRowSet customers = RowSetProvider.newFactory().createCachedRowSet();
|
||||
customers.setUsername(username);
|
||||
customers.setPassword(password);
|
||||
customers.setUrl(url);
|
||||
customers.setCommand(sql);
|
||||
customers.execute();
|
||||
|
||||
CachedRowSetImpl associates = new CachedRowSetImpl();
|
||||
CachedRowSet associates = RowSetProvider.newFactory().createCachedRowSet();
|
||||
associates.setUsername(username);
|
||||
associates.setPassword(password);
|
||||
associates.setUrl(url);
|
||||
|
@ -120,7 +116,7 @@ public class JdbcRowSetLiveTest {
|
|||
associates.setCommand(associatesSQL);
|
||||
associates.execute();
|
||||
|
||||
JoinRowSet jrs = new JoinRowSetImpl();
|
||||
JoinRowSet jrs = RowSetProvider.newFactory().createJoinRowSet();
|
||||
final String ID = "id";
|
||||
final String NAME = "name";
|
||||
jrs.addRowSet(customers, ID);
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
package com.baeldung.spring.jdbc;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.sql.CallableStatement;
|
||||
import java.sql.Connection;
|
||||
|
@ -24,7 +25,7 @@ import static org.junit.Assert.assertTrue;
|
|||
|
||||
public class JdbcLiveTest {
|
||||
|
||||
private static final Logger LOG = Logger.getLogger(JdbcLiveTest.class);
|
||||
private static final Logger LOG = LoggerFactory.getLogger(JdbcLiveTest.class);
|
||||
|
||||
private Connection con;
|
||||
|
||||
|
|
|
@ -13,7 +13,6 @@ import java.sql.Statement;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.junit.AfterClass;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.FixMethodOrder;
|
||||
|
@ -25,8 +24,6 @@ import junit.framework.Assert;
|
|||
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
|
||||
public class ResultSetLiveTest {
|
||||
|
||||
private static final Logger logger = Logger.getLogger(ResultSetLiveTest.class);
|
||||
|
||||
private final Employee expectedEmployee1 = new Employee(1, "John", 1000.0, "Developer");
|
||||
|
||||
private final Employee updatedEmployee1 = new Employee(1, "John", 1100.0, "Developer");
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
</dependencies>
|
||||
|
||||
<properties>
|
||||
<hbase.version>1.3.1</hbase.version>
|
||||
<hbase.version>2.5.3</hbase.version>
|
||||
</properties>
|
||||
|
||||
</project>
|
|
@ -1,7 +1,5 @@
|
|||
package com.baeldung.hbase;
|
||||
|
||||
|
||||
import com.google.protobuf.ServiceException;
|
||||
import org.apache.hadoop.conf.Configuration;
|
||||
import org.apache.hadoop.fs.Path;
|
||||
import org.apache.hadoop.hbase.HBaseConfiguration;
|
||||
|
@ -13,11 +11,11 @@ import java.io.IOException;
|
|||
//install hbase locally & hbase master start
|
||||
public class HbaseClientExample {
|
||||
|
||||
public static void main(String[] args) throws IOException, ServiceException {
|
||||
public static void main(String[] args) throws IOException {
|
||||
new HbaseClientExample().connect();
|
||||
}
|
||||
|
||||
private void connect() throws IOException, ServiceException {
|
||||
private void connect() throws IOException {
|
||||
Configuration config = HBaseConfiguration.create();
|
||||
|
||||
String path = this.getClass().getClassLoader().getResource("hbase-site.xml").getPath();
|
||||
|
@ -25,7 +23,7 @@ public class HbaseClientExample {
|
|||
config.addResource(new Path(path));
|
||||
|
||||
try {
|
||||
HBaseAdmin.checkHBaseAvailable(config);
|
||||
HBaseAdmin.available(config);
|
||||
} catch (MasterNotRunningException e) {
|
||||
System.out.println("HBase is not running." + e.getMessage());
|
||||
return;
|
||||
|
|
|
@ -24,11 +24,6 @@
|
|||
<artifactId>hibernate-core</artifactId>
|
||||
<version>${hibernate.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.xml.bind</groupId>
|
||||
<artifactId>jaxb-api</artifactId>
|
||||
<version>${jaxb.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.h2database</groupId>
|
||||
<artifactId>h2</artifactId>
|
||||
|
@ -37,8 +32,7 @@
|
|||
</dependencies>
|
||||
|
||||
<properties>
|
||||
<hsqldb.version>2.4.0</hsqldb.version>
|
||||
<jaxb.version>2.3.0</jaxb.version>
|
||||
<hsqldb.version>2.7.1</hsqldb.version>
|
||||
<h2.version>2.1.214</h2.version>
|
||||
</properties>
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package com.baeldung.hibernate.entitynotfoundexception;
|
||||
|
||||
import javax.persistence.*;
|
||||
import jakarta.persistence.*;
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
package com.baeldung.hibernate.entitynotfoundexception;
|
||||
|
||||
import org.hibernate.annotations.NotFound;
|
||||
import org.hibernate.annotations.NotFoundAction;
|
||||
|
||||
import javax.persistence.*;
|
||||
import jakarta.persistence.*;
|
||||
import java.io.Serializable;
|
||||
|
||||
@Entity
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package com.baeldung.hibernate.entitynotfoundexception;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Id;
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.Id;
|
||||
|
||||
@Entity
|
||||
public class User {
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
package com.baeldung.hibernate.exception.detachedentity.entity;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.GenerationType;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.ManyToOne;
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.GeneratedValue;
|
||||
import jakarta.persistence.GenerationType;
|
||||
import jakarta.persistence.Id;
|
||||
import jakarta.persistence.ManyToOne;
|
||||
|
||||
@Entity
|
||||
public class Comment {
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package com.baeldung.hibernate.exception.detachedentity.entity;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.GenerationType;
|
||||
import javax.persistence.Id;
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.GeneratedValue;
|
||||
import jakarta.persistence.GenerationType;
|
||||
import jakarta.persistence.Id;
|
||||
|
||||
@Entity
|
||||
public class Post {
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
package com.baeldung.hibernate.exception.lazyinitialization.entity;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.GenerationType;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.Table;
|
||||
import jakarta.persistence.Column;
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.GeneratedValue;
|
||||
import jakarta.persistence.GenerationType;
|
||||
import jakarta.persistence.Id;
|
||||
import jakarta.persistence.Table;
|
||||
|
||||
@Entity
|
||||
@Table(name = "role")
|
||||
|
|
|
@ -3,14 +3,14 @@ package com.baeldung.hibernate.exception.lazyinitialization.entity;
|
|||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.GenerationType;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.JoinColumn;
|
||||
import javax.persistence.OneToMany;
|
||||
import javax.persistence.Table;
|
||||
import jakarta.persistence.Column;
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.GeneratedValue;
|
||||
import jakarta.persistence.GenerationType;
|
||||
import jakarta.persistence.Id;
|
||||
import jakarta.persistence.JoinColumn;
|
||||
import jakarta.persistence.OneToMany;
|
||||
import jakarta.persistence.Table;
|
||||
|
||||
@Entity
|
||||
@Table(name = "user")
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
package com.baeldung.hibernate.exception.persistentobject.entity;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.GenerationType;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.ManyToOne;
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.GeneratedValue;
|
||||
import jakarta.persistence.GenerationType;
|
||||
import jakarta.persistence.Id;
|
||||
import jakarta.persistence.ManyToOne;
|
||||
|
||||
@Entity
|
||||
public class Article {
|
||||
|
|
|
@ -2,12 +2,11 @@ package com.baeldung.hibernate.exception.persistentobject.entity;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.GenerationType;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.OneToMany;
|
||||
import javax.persistence.OneToOne;
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.GeneratedValue;
|
||||
import jakarta.persistence.GenerationType;
|
||||
import jakarta.persistence.Id;
|
||||
import jakarta.persistence.OneToMany;
|
||||
|
||||
import org.hibernate.annotations.Cascade;
|
||||
import org.hibernate.annotations.CascadeType;
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
package com.baeldung.hibernate.exception.persistentobject.entity;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.GenerationType;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.JoinColumn;
|
||||
import jakarta.persistence.Column;
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.GeneratedValue;
|
||||
import jakarta.persistence.GenerationType;
|
||||
import jakarta.persistence.Id;
|
||||
|
||||
@Entity
|
||||
public class Book {
|
||||
|
|
|
@ -1,18 +1,12 @@
|
|||
package com.baeldung.hibernate.exception.transientobject.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.GenerationType;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.JoinColumn;
|
||||
import javax.persistence.OneToMany;
|
||||
import javax.persistence.OneToOne;
|
||||
import javax.persistence.Table;
|
||||
import jakarta.persistence.Column;
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.GeneratedValue;
|
||||
import jakarta.persistence.GenerationType;
|
||||
import jakarta.persistence.Id;
|
||||
import jakarta.persistence.OneToOne;
|
||||
import jakarta.persistence.Table;
|
||||
|
||||
@Entity
|
||||
@Table(name = "address")
|
||||
|
|
|
@ -3,15 +3,14 @@ package com.baeldung.hibernate.exception.transientobject.entity;
|
|||
import org.hibernate.annotations.Cascade;
|
||||
import org.hibernate.annotations.CascadeType;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.GenerationType;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.JoinColumn;
|
||||
import javax.persistence.ManyToMany;
|
||||
import javax.persistence.ManyToOne;
|
||||
import javax.persistence.Table;
|
||||
import jakarta.persistence.Column;
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.GeneratedValue;
|
||||
import jakarta.persistence.GenerationType;
|
||||
import jakarta.persistence.Id;
|
||||
import jakarta.persistence.JoinColumn;
|
||||
import jakarta.persistence.ManyToMany;
|
||||
import jakarta.persistence.Table;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
|
|
|
@ -4,15 +4,14 @@ package com.baeldung.hibernate.exception.transientobject.entity;
|
|||
import org.hibernate.annotations.Cascade;
|
||||
import org.hibernate.annotations.CascadeType;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.GenerationType;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.JoinColumn;
|
||||
import javax.persistence.ManyToMany;
|
||||
import javax.persistence.OneToMany;
|
||||
import javax.persistence.Table;
|
||||
import jakarta.persistence.Column;
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.GeneratedValue;
|
||||
import jakarta.persistence.GenerationType;
|
||||
import jakarta.persistence.Id;
|
||||
import jakarta.persistence.JoinColumn;
|
||||
import jakarta.persistence.ManyToMany;
|
||||
import jakarta.persistence.Table;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
package com.baeldung.hibernate.exception.transientobject.entity;
|
||||
|
||||
import javax.persistence.CascadeType;
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.GenerationType;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.OneToMany;
|
||||
import javax.persistence.Table;
|
||||
import jakarta.persistence.CascadeType;
|
||||
import jakarta.persistence.Column;
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.GeneratedValue;
|
||||
import jakarta.persistence.GenerationType;
|
||||
import jakarta.persistence.Id;
|
||||
import jakarta.persistence.OneToMany;
|
||||
import jakarta.persistence.Table;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
|
|
|
@ -4,15 +4,14 @@ package com.baeldung.hibernate.exception.transientobject.entity;
|
|||
import org.hibernate.annotations.Cascade;
|
||||
import org.hibernate.annotations.CascadeType;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.FetchType;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.GenerationType;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.JoinColumn;
|
||||
import javax.persistence.ManyToOne;
|
||||
import javax.persistence.Table;
|
||||
import jakarta.persistence.Column;
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.GeneratedValue;
|
||||
import jakarta.persistence.GenerationType;
|
||||
import jakarta.persistence.Id;
|
||||
import jakarta.persistence.JoinColumn;
|
||||
import jakarta.persistence.ManyToOne;
|
||||
import jakarta.persistence.Table;
|
||||
|
||||
@Entity
|
||||
@Table(name = "employee")
|
||||
|
|
|
@ -1,19 +1,14 @@
|
|||
package com.baeldung.hibernate.exception.transientobject.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.persistence.CascadeType;
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.GenerationType;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.JoinColumn;
|
||||
import javax.persistence.OneToMany;
|
||||
import javax.persistence.OneToOne;
|
||||
import javax.persistence.Table;
|
||||
import jakarta.persistence.CascadeType;
|
||||
import jakarta.persistence.Column;
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.GeneratedValue;
|
||||
import jakarta.persistence.GenerationType;
|
||||
import jakarta.persistence.Id;
|
||||
import jakarta.persistence.JoinColumn;
|
||||
import jakarta.persistence.OneToOne;
|
||||
import jakarta.persistence.Table;
|
||||
|
||||
@Entity
|
||||
@Table(name = "user")
|
||||
|
|
|
@ -4,10 +4,10 @@ import org.junit.After;
|
|||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
import javax.persistence.EntityManager;
|
||||
import javax.persistence.EntityManagerFactory;
|
||||
import javax.persistence.EntityNotFoundException;
|
||||
import javax.persistence.Persistence;
|
||||
import jakarta.persistence.EntityManager;
|
||||
import jakarta.persistence.EntityManagerFactory;
|
||||
import jakarta.persistence.EntityNotFoundException;
|
||||
import jakarta.persistence.Persistence;
|
||||
import java.io.IOException;
|
||||
|
||||
public class EntityNotFoundExceptionIntegrationTest {
|
||||
|
|
|
@ -3,13 +3,12 @@ package com.baeldung.hibernate.exception.detachedentity;
|
|||
import com.baeldung.hibernate.exception.detachedentity.entity.Comment;
|
||||
import com.baeldung.hibernate.exception.detachedentity.entity.Post;
|
||||
|
||||
import org.assertj.core.api.Assertions;
|
||||
import org.hibernate.Session;
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
import javax.persistence.PersistenceException;
|
||||
import jakarta.persistence.PersistenceException;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
@ -43,7 +42,7 @@ public class DetachedEntityUnitTest {
|
|||
|
||||
assertThatThrownBy(() -> session.persist(detachedPost))
|
||||
.isInstanceOf(PersistenceException.class)
|
||||
.hasMessageContaining("org.hibernate.PersistentObjectException: detached entity passed to persist");
|
||||
.hasMessageContaining("`org.hibernate.PersistentObjectException` to JPA `PersistenceException` : detached entity passed to persist");
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -72,7 +71,7 @@ public class DetachedEntityUnitTest {
|
|||
|
||||
assertThatThrownBy(() -> session.persist(detachedPost))
|
||||
.isInstanceOf(PersistenceException.class)
|
||||
.hasMessageContaining("org.hibernate.PersistentObjectException: detached entity passed to persist");
|
||||
.hasMessageContaining("`org.hibernate.PersistentObjectException` to JPA `PersistenceException` : detached entity passed to persist");
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
|
@ -83,11 +83,13 @@
|
|||
</dependencies>
|
||||
|
||||
<properties>
|
||||
<hibernate.version>5.3.7.Final</hibernate.version>
|
||||
<mysql.version>8.0.13</mysql.version>
|
||||
<mariaDB4j.version>2.2.3</mariaDB4j.version>
|
||||
<spring-boot.version>2.1.7.RELEASE</spring-boot.version>
|
||||
<h2.version>1.4.200</h2.version>
|
||||
<hibernate.version>6.1.7.Final</hibernate.version>
|
||||
<mysql.version>8.0.32</mysql.version>
|
||||
<mariaDB4j.version>2.6.0</mariaDB4j.version>
|
||||
<spring-boot.version>3.0.4</spring-boot.version>
|
||||
<h2.version>2.1.214</h2.version>
|
||||
<org.slf4j.version>2.0.7</org.slf4j.version>
|
||||
<logback.version>1.4.6</logback.version>
|
||||
</properties>
|
||||
|
||||
</project>
|
|
@ -1,7 +1,7 @@
|
|||
package com.baeldung.hibernate.converters;
|
||||
|
||||
import javax.persistence.AttributeConverter;
|
||||
import javax.persistence.Converter;
|
||||
import jakarta.persistence.AttributeConverter;
|
||||
import jakarta.persistence.Converter;
|
||||
|
||||
import com.baeldung.hibernate.pojo.PersonName;
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ package com.baeldung.hibernate.entities;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import javax.persistence.*;
|
||||
import jakarta.persistence.*;
|
||||
|
||||
@Entity
|
||||
public class Department {
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
package com.baeldung.hibernate.entities;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.GenerationType;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.ManyToOne;
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.GeneratedValue;
|
||||
import jakarta.persistence.GenerationType;
|
||||
import jakarta.persistence.Id;
|
||||
import jakarta.persistence.ManyToOne;
|
||||
|
||||
@org.hibernate.annotations.NamedQueries({ @org.hibernate.annotations.NamedQuery(name = "DeptEmployee_FindByEmployeeNumber", query = "from DeptEmployee where employeeNumber = :employeeNo"),
|
||||
@org.hibernate.annotations.NamedQuery(name = "DeptEmployee_FindAllByDesgination", query = "from DeptEmployee where designation = :designation"),
|
||||
@org.hibernate.annotations.NamedQuery(name = "DeptEmployee_FindAllByDesgination", query = "from DeptEmployee where employeeNumber = :employeeNumber"),
|
||||
@org.hibernate.annotations.NamedQuery(name = "DeptEmployee_UpdateEmployeeDepartment", query = "Update DeptEmployee set department = :newDepartment where employeeNumber = :employeeNo"),
|
||||
@org.hibernate.annotations.NamedQuery(name = "DeptEmployee_FindAllByDepartment", query = "from DeptEmployee where department = :department", timeout = 1, fetchSize = 10) })
|
||||
@org.hibernate.annotations.NamedNativeQueries({ @org.hibernate.annotations.NamedNativeQuery(name = "DeptEmployee_FindByEmployeeName", query = "select * from deptemployee emp where name=:name", resultClass = DeptEmployee.class),
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package com.baeldung.hibernate.entitymanager.getreference;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Id;
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.Id;
|
||||
|
||||
@Entity
|
||||
public class Game {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package com.baeldung.hibernate.entitymanager.getreference;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.ManyToOne;
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.Id;
|
||||
import jakarta.persistence.ManyToOne;
|
||||
|
||||
@Entity
|
||||
public class Player {
|
||||
|
|
|
@ -2,7 +2,7 @@ package com.baeldung.hibernate.jpabootstrap.application;
|
|||
|
||||
import com.baeldung.hibernate.jpabootstrap.config.JpaEntityManagerFactory;
|
||||
import com.baeldung.hibernate.jpabootstrap.entities.User;
|
||||
import javax.persistence.EntityManager;
|
||||
import jakarta.persistence.EntityManager;
|
||||
|
||||
public class Application {
|
||||
|
||||
|
@ -24,8 +24,7 @@ public class Application {
|
|||
}
|
||||
|
||||
private static class EntityManagerHolder {
|
||||
private static final EntityManager ENTITY_MANAGER = new JpaEntityManagerFactory(
|
||||
new Class[]{User.class}).getEntityManager();
|
||||
private static final EntityManager ENTITY_MANAGER = new JpaEntityManagerFactory(new Class[]{User.class}).getEntityManager();
|
||||
}
|
||||
|
||||
public static EntityManager getJpaEntityManager() {
|
||||
|
|
|
@ -6,11 +6,11 @@ import java.util.Collections;
|
|||
import java.util.List;
|
||||
import java.util.Properties;
|
||||
import javax.sql.DataSource;
|
||||
import javax.persistence.SharedCacheMode;
|
||||
import javax.persistence.ValidationMode;
|
||||
import javax.persistence.spi.ClassTransformer;
|
||||
import javax.persistence.spi.PersistenceUnitInfo;
|
||||
import javax.persistence.spi.PersistenceUnitTransactionType;
|
||||
import jakarta.persistence.SharedCacheMode;
|
||||
import jakarta.persistence.ValidationMode;
|
||||
import jakarta.persistence.spi.ClassTransformer;
|
||||
import jakarta.persistence.spi.PersistenceUnitInfo;
|
||||
import jakarta.persistence.spi.PersistenceUnitTransactionType;
|
||||
import org.hibernate.jpa.HibernatePersistenceProvider;
|
||||
|
||||
public class HibernatePersistenceUnitInfo implements PersistenceUnitInfo {
|
||||
|
|
|
@ -7,10 +7,10 @@ import java.util.List;
|
|||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
import java.util.stream.Collectors;
|
||||
import javax.persistence.EntityManager;
|
||||
import jakarta.persistence.EntityManager;
|
||||
import javax.sql.DataSource;
|
||||
import javax.persistence.EntityManagerFactory;
|
||||
import javax.persistence.spi.PersistenceUnitInfo;
|
||||
import jakarta.persistence.EntityManagerFactory;
|
||||
import jakarta.persistence.spi.PersistenceUnitInfo;
|
||||
import org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl;
|
||||
import org.hibernate.jpa.boot.internal.PersistenceUnitInfoDescriptor;
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
package com.baeldung.hibernate.jpabootstrap.entities;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.GenerationType;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.Table;
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.GeneratedValue;
|
||||
import jakarta.persistence.GenerationType;
|
||||
import jakarta.persistence.Id;
|
||||
import jakarta.persistence.Table;
|
||||
|
||||
@Entity
|
||||
@Table(name = "users")
|
||||
|
|
|
@ -2,13 +2,13 @@ package com.baeldung.hibernate.jpacriteriabuilder.service;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import javax.persistence.EntityManager;
|
||||
import javax.persistence.TypedQuery;
|
||||
import javax.persistence.criteria.CriteriaBuilder;
|
||||
import javax.persistence.criteria.CriteriaBuilder.In;
|
||||
import javax.persistence.criteria.CriteriaQuery;
|
||||
import javax.persistence.criteria.Root;
|
||||
import javax.persistence.criteria.Subquery;
|
||||
import jakarta.persistence.EntityManager;
|
||||
import jakarta.persistence.TypedQuery;
|
||||
import jakarta.persistence.criteria.CriteriaBuilder;
|
||||
import jakarta.persistence.criteria.CriteriaBuilder.In;
|
||||
import jakarta.persistence.criteria.CriteriaQuery;
|
||||
import jakarta.persistence.criteria.Root;
|
||||
import jakarta.persistence.criteria.Subquery;
|
||||
|
||||
import com.baeldung.hibernate.entities.Department;
|
||||
import com.baeldung.hibernate.entities.DeptEmployee;
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
package com.baeldung.hibernate.onetoone.foreignkeybased;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.GenerationType;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.OneToOne;
|
||||
import javax.persistence.Table;
|
||||
import jakarta.persistence.Column;
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.GeneratedValue;
|
||||
import jakarta.persistence.GenerationType;
|
||||
import jakarta.persistence.Id;
|
||||
import jakarta.persistence.OneToOne;
|
||||
import jakarta.persistence.Table;
|
||||
|
||||
@Entity
|
||||
@Table(name = "address")
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
package com.baeldung.hibernate.onetoone.foreignkeybased;
|
||||
|
||||
import javax.persistence.CascadeType;
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.GenerationType;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.JoinColumn;
|
||||
import javax.persistence.OneToOne;
|
||||
import javax.persistence.Table;
|
||||
import jakarta.persistence.CascadeType;
|
||||
import jakarta.persistence.Column;
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.GeneratedValue;
|
||||
import jakarta.persistence.GenerationType;
|
||||
import jakarta.persistence.Id;
|
||||
import jakarta.persistence.JoinColumn;
|
||||
import jakarta.persistence.OneToOne;
|
||||
import jakarta.persistence.Table;
|
||||
|
||||
@Entity
|
||||
@Table(name = "users")
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
package com.baeldung.hibernate.onetoone.jointablebased;
|
||||
|
||||
import javax.persistence.CascadeType;
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.GenerationType;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.JoinColumn;
|
||||
import javax.persistence.JoinTable;
|
||||
import javax.persistence.OneToOne;
|
||||
import javax.persistence.Table;
|
||||
import jakarta.persistence.CascadeType;
|
||||
import jakarta.persistence.Column;
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.GeneratedValue;
|
||||
import jakarta.persistence.GenerationType;
|
||||
import jakarta.persistence.Id;
|
||||
import jakarta.persistence.JoinColumn;
|
||||
import jakarta.persistence.JoinTable;
|
||||
import jakarta.persistence.OneToOne;
|
||||
import jakarta.persistence.Table;
|
||||
|
||||
@Entity
|
||||
@Table(name = "employee")
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
package com.baeldung.hibernate.onetoone.jointablebased;
|
||||
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.GenerationType;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.OneToOne;
|
||||
import javax.persistence.Table;
|
||||
import jakarta.persistence.Column;
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.GeneratedValue;
|
||||
import jakarta.persistence.GenerationType;
|
||||
import jakarta.persistence.Id;
|
||||
import jakarta.persistence.OneToOne;
|
||||
import jakarta.persistence.Table;
|
||||
|
||||
@Entity
|
||||
@Table(name = "workstation")
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
package com.baeldung.hibernate.onetoone.sharedkeybased;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.JoinColumn;
|
||||
import javax.persistence.MapsId;
|
||||
import javax.persistence.OneToOne;
|
||||
import javax.persistence.Table;
|
||||
import jakarta.persistence.Column;
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.Id;
|
||||
import jakarta.persistence.JoinColumn;
|
||||
import jakarta.persistence.MapsId;
|
||||
import jakarta.persistence.OneToOne;
|
||||
import jakarta.persistence.Table;
|
||||
|
||||
@Entity
|
||||
@Table(name = "address")
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
package com.baeldung.hibernate.onetoone.sharedkeybased;
|
||||
|
||||
|
||||
import javax.persistence.CascadeType;
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.GenerationType;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.OneToOne;
|
||||
import javax.persistence.PrimaryKeyJoinColumn;
|
||||
import javax.persistence.Table;
|
||||
import jakarta.persistence.CascadeType;
|
||||
import jakarta.persistence.Column;
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.GeneratedValue;
|
||||
import jakarta.persistence.GenerationType;
|
||||
import jakarta.persistence.Id;
|
||||
import jakarta.persistence.OneToOne;
|
||||
import jakarta.persistence.PrimaryKeyJoinColumn;
|
||||
import jakarta.persistence.Table;
|
||||
|
||||
@Entity
|
||||
@Table(name = "users")
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package com.baeldung.hibernate.optimisticlocking;
|
||||
|
||||
import javax.persistence.*;
|
||||
import jakarta.persistence.*;
|
||||
|
||||
@Entity
|
||||
public class OptimisticLockingCourse {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package com.baeldung.hibernate.optimisticlocking;
|
||||
|
||||
import javax.persistence.*;
|
||||
import jakarta.persistence.*;
|
||||
import java.util.List;
|
||||
|
||||
@Entity
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package com.baeldung.hibernate.pessimisticlocking;
|
||||
|
||||
import javax.persistence.Embeddable;
|
||||
import jakarta.persistence.Embeddable;
|
||||
|
||||
@Embeddable
|
||||
public class Address {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package com.baeldung.hibernate.pessimisticlocking;
|
||||
|
||||
import javax.persistence.*;
|
||||
import jakarta.persistence.*;
|
||||
import java.util.List;
|
||||
|
||||
@Entity
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package com.baeldung.hibernate.pessimisticlocking;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.Inheritance;
|
||||
import javax.persistence.InheritanceType;
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.Id;
|
||||
import jakarta.persistence.Inheritance;
|
||||
import jakarta.persistence.InheritanceType;
|
||||
|
||||
@Entity
|
||||
@Inheritance(strategy = InheritanceType.JOINED)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package com.baeldung.hibernate.pessimisticlocking;
|
||||
|
||||
import javax.persistence.*;
|
||||
import jakarta.persistence.*;
|
||||
|
||||
@Entity
|
||||
public class PessimisticLockingCourse {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package com.baeldung.hibernate.pessimisticlocking;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
import jakarta.persistence.Entity;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Entity
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package com.baeldung.hibernate.pessimisticlocking;
|
||||
|
||||
import javax.persistence.*;
|
||||
import jakarta.persistence.*;
|
||||
import java.util.List;
|
||||
|
||||
@Entity
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package com.baeldung.hibernate.pojo;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.Table;
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.Id;
|
||||
import jakarta.persistence.Table;
|
||||
|
||||
@Entity
|
||||
@Table(name = "MOVIE")
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package com.baeldung.hibernate.pojo;
|
||||
|
||||
import javax.persistence.Convert;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.Id;
|
||||
import jakarta.persistence.Convert;
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.GeneratedValue;
|
||||
import jakarta.persistence.Id;
|
||||
|
||||
import com.baeldung.hibernate.converters.PersonNameConverter;
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package com.baeldung.hibernate.pojo;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.Table;
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.GeneratedValue;
|
||||
import jakarta.persistence.Id;
|
||||
import jakarta.persistence.Table;
|
||||
|
||||
@Entity
|
||||
@Table(name = "posts")
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package com.baeldung.hibernate.pojo;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.GenerationType;
|
||||
import javax.persistence.Id;
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.GeneratedValue;
|
||||
import jakarta.persistence.GenerationType;
|
||||
import jakarta.persistence.Id;
|
||||
|
||||
@Entity
|
||||
public class Student {
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package com.baeldung.hibernate.serializable;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.JoinColumn;
|
||||
import javax.persistence.ManyToOne;
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.Id;
|
||||
import jakarta.persistence.JoinColumn;
|
||||
import jakarta.persistence.ManyToOne;
|
||||
|
||||
@Entity
|
||||
public class Account {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package com.baeldung.hibernate.serializable;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Id;
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.Id;
|
||||
import java.io.Serializable;
|
||||
|
||||
@Entity
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package com.baeldung.hibernate.serializable;
|
||||
|
||||
import javax.persistence.EmbeddedId;
|
||||
import javax.persistence.Entity;
|
||||
import jakarta.persistence.EmbeddedId;
|
||||
import jakarta.persistence.Entity;
|
||||
|
||||
@Entity
|
||||
public class User {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package com.baeldung.hibernate.serializable;
|
||||
|
||||
import javax.persistence.Embeddable;
|
||||
import jakarta.persistence.Embeddable;
|
||||
import java.io.Serializable;
|
||||
|
||||
@Embeddable
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package com.baeldung.persistencecontext.entity;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Id;
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.Id;
|
||||
|
||||
@Entity
|
||||
@Entity(name = "users")
|
||||
public class User {
|
||||
|
||||
@Id
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
package com.baeldung.persistencecontext.service;
|
||||
|
||||
import javax.persistence.EntityManager;
|
||||
import javax.persistence.PersistenceContext;
|
||||
import javax.persistence.PersistenceContextType;
|
||||
import javax.transaction.Transactional;
|
||||
import jakarta.persistence.EntityManager;
|
||||
import jakarta.persistence.PersistenceContext;
|
||||
import jakarta.persistence.PersistenceContextType;
|
||||
import jakarta.transaction.Transactional;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baeldung.persistencecontext.entity.User;
|
||||
|
||||
@Component
|
||||
@Service
|
||||
public class ExtendedPersistenceContextUserService {
|
||||
|
||||
@PersistenceContext(type = PersistenceContextType.EXTENDED)
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
package com.baeldung.persistencecontext.service;
|
||||
|
||||
|
||||
import javax.persistence.EntityManager;
|
||||
import javax.persistence.PersistenceContext;
|
||||
import javax.transaction.Transactional;
|
||||
import jakarta.persistence.EntityManager;
|
||||
import jakarta.persistence.PersistenceContext;
|
||||
import jakarta.transaction.Transactional;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baeldung.persistencecontext.entity.User;
|
||||
|
||||
@Component
|
||||
@Service
|
||||
public class TransctionPersistenceContextUserService {
|
||||
|
||||
@PersistenceContext
|
||||
|
|
|
@ -8,12 +8,13 @@
|
|||
<class>com.baeldung.hibernate.pojo.Movie</class>
|
||||
<exclude-unlisted-classes>true</exclude-unlisted-classes>
|
||||
<properties>
|
||||
<property name="hibernate.dialect" value="org.hibernate.dialect.MySQL5Dialect"/>
|
||||
<property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect"/>
|
||||
<property name="hibernate.hbm2ddl.auto" value="update"/>
|
||||
<property name="javax.persistence.jdbc.driver" value="com.mysql.jdbc.Driver"/>
|
||||
<property name="javax.persistence.jdbc.url" value="jdbc:mysql://127.0.0.1:3306/moviecatalog"/>
|
||||
<property name="javax.persistence.jdbc.user" value="root"/>
|
||||
<property name="javax.persistence.jdbc.password" value="root"/>
|
||||
<property name="jakarta.persistence.jdbc.driver" value="com.mysql.jdbc.Driver"/>
|
||||
<property name="jakarta.persistence.jdbc.url" value="jdbc:mysql://127.0.0.1:3306/moviecatalog"/>
|
||||
<property name="jakarta.persistence.jdbc.user" value="root"/>
|
||||
<property name="jakarta.persistence.jdbc.password" value="root"/>
|
||||
<property name="hibernate.id.db_structure_naming_strategy" value="legacy" />
|
||||
</properties>
|
||||
</persistence-unit>
|
||||
<!-- Persistence unit for H2 -->
|
||||
|
@ -34,10 +35,14 @@
|
|||
<property name="hibernate.show_sql" value="true"/>
|
||||
<property name="hibernate.generate_statistics" value="false"/>
|
||||
<property name="hibernate.dialect" value="org.hibernate.dialect.H2Dialect"/>
|
||||
<property name="javax.persistence.jdbc.driver" value="org.h2.Driver"/>
|
||||
<property name="javax.persistence.jdbc.url" value="jdbc:h2:mem:db1;DB_CLOSE_DELAY=-1"/>
|
||||
<property name="javax.persistence.jdbc.user" value="sa"/>
|
||||
<property name="javax.persistence.jdbc.password" value=""/>
|
||||
<property name="jakarta.persistence.jdbc.driver" value="org.h2.Driver"/>
|
||||
<property name="jakarta.persistence.jdbc.url" value="jdbc:h2:mem:db1;DB_CLOSE_DELAY=-1"/>
|
||||
<property name="jakarta.persistence.jdbc.user" value="sa"/>
|
||||
<property name="jakarta.persistence.jdbc.password" value=""/>
|
||||
<property name="hibernate.id.db_structure_naming_strategy" value="legacy" />
|
||||
<!-- ensure backward compatibility -->
|
||||
<property name="hibernate.type.preferred_duration_jdbc_type" value="BIGINT" />
|
||||
<property name="hibernate.type.preferred_instant_jdbc_type" value="TIMESTAMP" />
|
||||
</properties>
|
||||
</persistence-unit>
|
||||
<!-- Persistence unit for MySQL -->
|
||||
|
@ -57,16 +62,20 @@
|
|||
<property name="hibernate.hbm2ddl.auto" value="update"/>
|
||||
<property name="hibernate.show_sql" value="true"/>
|
||||
<property name="hibernate.generate_statistics" value="false"/>
|
||||
<property name="hibernate.dialect" value="org.hibernate.dialect.MySQL5Dialect"/>
|
||||
<property name="javax.persistence.jdbc.driver" value="com.mysql.cj.jdbc.Driver"/>
|
||||
<property name="javax.persistence.jdbc.url" value="jdbc:mysql://localhost:3306/baeldung"/>
|
||||
<property name="javax.persistence.jdbc.user" value="root"/>
|
||||
<property name="javax.persistence.jdbc.password" value="password"/>
|
||||
<property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect"/>
|
||||
<property name="jakarta.persistence.jdbc.driver" value="com.mysql.cj.jdbc.Driver"/>
|
||||
<property name="jakarta.persistence.jdbc.url" value="jdbc:mysql://localhost:3306/baeldung"/>
|
||||
<property name="jakarta.persistence.jdbc.user" value="root"/>
|
||||
<property name="jakarta.persistence.jdbc.password" value="password"/>
|
||||
|
||||
<property name="javax.persistence.schema-generation.database.action" value="drop-and-create"/>
|
||||
<property name="javax.persistence.schema-generation.create-script-source" value="/META-INF/create-db.sql"/>
|
||||
<property name="javax.persistence.schema-generation.drop-script-source" value="/META-INF/drop-db.sql"/>
|
||||
<property name="javax.persistence.sql-load-script-source" value="/META-INF/data.sql"/>
|
||||
<property name="jakarta.persistence.schema-generation.database.action" value="drop-and-create"/>
|
||||
<property name="jakarta.persistence.schema-generation.create-script-source" value="/META-INF/create-db.sql"/>
|
||||
<property name="jakarta.persistence.schema-generation.drop-script-source" value="/META-INF/drop-db.sql"/>
|
||||
<property name="jakarta.persistence.sql-load-script-source" value="/META-INF/data.sql"/>
|
||||
<property name="hibernate.id.db_structure_naming_strategy" value="legacy" />
|
||||
<!-- ensure backward compatibility -->
|
||||
<property name="hibernate.type.preferred_duration_jdbc_type" value="BIGINT" />
|
||||
<property name="hibernate.type.preferred_instant_jdbc_type" value="TIMESTAMP" />
|
||||
|
||||
</properties>
|
||||
</persistence-unit>
|
||||
|
@ -87,16 +96,20 @@
|
|||
<property name="hibernate.hbm2ddl.auto" value="update"/>
|
||||
<property name="hibernate.show_sql" value="true"/>
|
||||
<property name="hibernate.generate_statistics" value="false"/>
|
||||
<property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQL95Dialect"/>
|
||||
<property name="javax.persistence.jdbc.driver" value="org.postgresql.Driver"/>
|
||||
<property name="javax.persistence.jdbc.url" value="jdbc:postgresql://localhost:5432/postgres"/>
|
||||
<property name="javax.persistence.jdbc.user" value="postgres"/>
|
||||
<property name="javax.persistence.jdbc.password" value=""/>
|
||||
<property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQLDialect"/>
|
||||
<property name="jakarta.persistence.jdbc.driver" value="org.postgresql.Driver"/>
|
||||
<property name="jakarta.persistence.jdbc.url" value="jdbc:postgresql://localhost:5432/postgres"/>
|
||||
<property name="jakarta.persistence.jdbc.user" value="postgres"/>
|
||||
<property name="jakarta.persistence.jdbc.password" value=""/>
|
||||
|
||||
<property name="javax.persistence.schema-generation.database.action" value="drop-and-create"/>
|
||||
<property name="javax.persistence.schema-generation.create-script-source" value="/META-INF/create-db.sql"/>
|
||||
<property name="javax.persistence.schema-generation.drop-script-source" value="/META-INF/drop-db.sql"/>
|
||||
<property name="javax.persistence.sql-load-script-source" value="/META-INF/data.sql"/>
|
||||
<property name="jakarta.persistence.schema-generation.database.action" value="drop-and-create"/>
|
||||
<property name="jakarta.persistence.schema-generation.create-script-source" value="/META-INF/create-db.sql"/>
|
||||
<property name="jakarta.persistence.schema-generation.drop-script-source" value="/META-INF/drop-db.sql"/>
|
||||
<property name="jakarta.persistence.sql-load-script-source" value="/META-INF/data.sql"/>
|
||||
<property name="hibernate.id.db_structure_naming_strategy" value="legacy" />
|
||||
<!-- ensure backward compatibility -->
|
||||
<property name="hibernate.type.preferred_duration_jdbc_type" value="BIGINT" />
|
||||
<property name="hibernate.type.preferred_instant_jdbc_type" value="TIMESTAMP" />
|
||||
|
||||
</properties>
|
||||
</persistence-unit>
|
||||
|
@ -113,10 +126,16 @@
|
|||
<property name="hibernate.show_sql" value="true"/>
|
||||
<property name="hibernate.generate_statistics" value="false"/>
|
||||
<property name="hibernate.dialect" value="org.hibernate.dialect.H2Dialect"/>
|
||||
<property name="javax.persistence.jdbc.driver" value="org.h2.Driver"/>
|
||||
<property name="javax.persistence.jdbc.url" value="jdbc:h2:mem:db2;DB_CLOSE_DELAY=-1"/>
|
||||
<property name="javax.persistence.jdbc.user" value="sa"/>
|
||||
<property name="javax.persistence.jdbc.password" value=""/>
|
||||
<property name="jakarta.persistence.jdbc.driver" value="org.h2.Driver"/>
|
||||
<property name="jakarta.persistence.jdbc.url" value="jdbc:h2:mem:db2;DB_CLOSE_DELAY=-1"/>
|
||||
<property name="jakarta.persistence.jdbc.user" value="sa"/>
|
||||
<property name="jakarta.persistence.jdbc.password" value=""/>
|
||||
<property name="hibernate.id.db_structure_naming_strategy" value="legacy" />
|
||||
<!-- ensure backward compatibility -->
|
||||
<property name="hibernate.type.preferred_duration_jdbc_type" value="BIGINT" />
|
||||
<property name="hibernate.type.preferred_instant_jdbc_type" value="TIMESTAMP" />
|
||||
|
||||
<property name="hibernate.globally_quoted_identifiers" value="true"/>
|
||||
</properties>
|
||||
</persistence-unit>
|
||||
|
||||
|
|
|
@ -5,9 +5,9 @@ import ch.qos.logback.classic.Logger;
|
|||
import org.junit.jupiter.api.*;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import javax.persistence.EntityManager;
|
||||
import javax.persistence.EntityManagerFactory;
|
||||
import javax.persistence.Persistence;
|
||||
import jakarta.persistence.EntityManager;
|
||||
import jakarta.persistence.EntityManagerFactory;
|
||||
import jakarta.persistence.Persistence;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.io.PrintStream;
|
||||
|
@ -87,8 +87,8 @@ public class GetReferenceH2IntegrationTest {
|
|||
});
|
||||
|
||||
StringBuilder expected = new StringBuilder();
|
||||
expected.append("Hibernate: select game0_.id as id1_0_0_, game0_.name as name2_0_0_ from Game game0_ where game0_.id=?\n");
|
||||
expected.append("Hibernate: update Game set name=? where id=?\n");
|
||||
expected.append("Hibernate: select g1_0.id,g1_0.name from Game g1_0 where g1_0.id=?" + System.lineSeparator());
|
||||
expected.append("Hibernate: update Game set name=? where id=?" + System.lineSeparator());
|
||||
|
||||
assertEquals(expected.toString(), output.toString());
|
||||
}
|
||||
|
@ -104,8 +104,8 @@ public class GetReferenceH2IntegrationTest {
|
|||
});
|
||||
|
||||
StringBuilder expected = new StringBuilder();
|
||||
expected.append("Hibernate: select game0_.id as id1_0_0_, game0_.name as name2_0_0_ from Game game0_ where game0_.id=?\n");
|
||||
expected.append("Hibernate: update Game set name=? where id=?\n");
|
||||
expected.append("Hibernate: select g1_0.id,g1_0.name from Game g1_0 where g1_0.id=?" + System.lineSeparator());
|
||||
expected.append("Hibernate: update Game set name=? where id=?" + System.lineSeparator());
|
||||
|
||||
assertEquals(expected.toString(), output.toString());
|
||||
}
|
||||
|
@ -120,10 +120,9 @@ public class GetReferenceH2IntegrationTest {
|
|||
|
||||
StringBuilder expected = new StringBuilder();
|
||||
expected.append("Hibernate: select ");
|
||||
expected.append("player0_.id as id1_1_0_, player0_.game_id as game_id3_1_0_, ");
|
||||
expected.append("player0_.name as name2_1_0_, game1_.id as id1_0_1_, game1_.name as name2_0_1_ ");
|
||||
expected.append("from Player player0_ left outer join Game game1_ on player0_.game_id=game1_.id where player0_.id=?\n");
|
||||
expected.append("Hibernate: delete from Player where id=?\n");
|
||||
expected.append("p1_0.id,g1_0.id,g1_0.name,p1_0.name ");
|
||||
expected.append("from Player p1_0 left join Game g1_0 on g1_0.id=p1_0.game_id where p1_0.id=?" + System.lineSeparator());
|
||||
expected.append("Hibernate: delete from Player where id=?" + System.lineSeparator());
|
||||
|
||||
assertEquals(expected.toString(), output.toString());
|
||||
}
|
||||
|
@ -138,10 +137,9 @@ public class GetReferenceH2IntegrationTest {
|
|||
|
||||
StringBuilder expected = new StringBuilder();
|
||||
expected.append("Hibernate: select ");
|
||||
expected.append("player0_.id as id1_1_0_, player0_.game_id as game_id3_1_0_, ");
|
||||
expected.append("player0_.name as name2_1_0_, game1_.id as id1_0_1_, game1_.name as name2_0_1_ ");
|
||||
expected.append("from Player player0_ left outer join Game game1_ on player0_.game_id=game1_.id where player0_.id=?\n");
|
||||
expected.append("Hibernate: delete from Player where id=?\n");
|
||||
expected.append("p1_0.id,g1_0.id,g1_0.name,p1_0.name ");
|
||||
expected.append("from Player p1_0 left join Game g1_0 on g1_0.id=p1_0.game_id where p1_0.id=?" + System.lineSeparator());
|
||||
expected.append("Hibernate: delete from Player where id=?" + System.lineSeparator());
|
||||
|
||||
assertEquals(expected.toString(), output.toString());
|
||||
}
|
||||
|
@ -159,12 +157,11 @@ public class GetReferenceH2IntegrationTest {
|
|||
}));
|
||||
|
||||
StringBuilder expected = new StringBuilder();
|
||||
expected.append("Hibernate: select game0_.id as id1_0_0_, game0_.name as name2_0_0_ from Game game0_ where game0_.id=?\n");
|
||||
expected.append("Hibernate: select g1_0.id,g1_0.name from Game g1_0 where g1_0.id=?" + System.lineSeparator());
|
||||
expected.append("Hibernate: select ");
|
||||
expected.append("player0_.id as id1_1_0_, player0_.game_id as game_id3_1_0_, ");
|
||||
expected.append("player0_.name as name2_1_0_, game1_.id as id1_0_1_, game1_.name as name2_0_1_ ");
|
||||
expected.append("from Player player0_ left outer join Game game1_ on player0_.game_id=game1_.id where player0_.id=?\n");
|
||||
expected.append("Hibernate: update Player set game_id=?, name=? where id=?\n");
|
||||
expected.append("p1_0.id,g1_0.id,g1_0.name,p1_0.name ");
|
||||
expected.append("from Player p1_0 left join Game g1_0 on g1_0.id=p1_0.game_id where p1_0.id=?" + System.lineSeparator());
|
||||
expected.append("Hibernate: update Player set game_id=?, name=? where id=?" + System.lineSeparator());
|
||||
|
||||
assertEquals(expected.toString(), output.toString());
|
||||
}
|
||||
|
@ -183,10 +180,9 @@ public class GetReferenceH2IntegrationTest {
|
|||
|
||||
StringBuilder expected = new StringBuilder();
|
||||
expected.append("Hibernate: select ");
|
||||
expected.append("player0_.id as id1_1_0_, player0_.game_id as game_id3_1_0_, ");
|
||||
expected.append("player0_.name as name2_1_0_, game1_.id as id1_0_1_, game1_.name as name2_0_1_ ");
|
||||
expected.append("from Player player0_ left outer join Game game1_ on player0_.game_id=game1_.id where player0_.id=?\n");
|
||||
expected.append("Hibernate: update Player set game_id=?, name=? where id=?\n");
|
||||
expected.append("p1_0.id,g1_0.id,g1_0.name,p1_0.name ");
|
||||
expected.append("from Player p1_0 left join Game g1_0 on g1_0.id=p1_0.game_id where p1_0.id=?" + System.lineSeparator());
|
||||
expected.append("Hibernate: update Player set game_id=?, name=? where id=?" + System.lineSeparator());
|
||||
|
||||
assertEquals(expected.toString(), output.toString());
|
||||
}
|
||||
|
|
|
@ -5,9 +5,9 @@ import ch.qos.logback.classic.Logger;
|
|||
import org.junit.jupiter.api.*;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import javax.persistence.EntityManager;
|
||||
import javax.persistence.EntityManagerFactory;
|
||||
import javax.persistence.Persistence;
|
||||
import jakarta.persistence.EntityManager;
|
||||
import jakarta.persistence.EntityManagerFactory;
|
||||
import jakarta.persistence.Persistence;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.io.PrintStream;
|
||||
|
|
|
@ -5,9 +5,9 @@ import ch.qos.logback.classic.Logger;
|
|||
import org.junit.jupiter.api.*;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import javax.persistence.EntityManager;
|
||||
import javax.persistence.EntityManagerFactory;
|
||||
import javax.persistence.Persistence;
|
||||
import jakarta.persistence.EntityManager;
|
||||
import jakarta.persistence.EntityManagerFactory;
|
||||
import jakarta.persistence.Persistence;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.io.PrintStream;
|
||||
|
|
|
@ -9,7 +9,7 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import javax.persistence.EntityManager;
|
||||
import jakarta.persistence.EntityManager;
|
||||
|
||||
import org.hibernate.HibernateException;
|
||||
import org.hibernate.Session;
|
||||
|
@ -81,7 +81,7 @@ public class EmployeeSearchServiceIntegrationTest {
|
|||
|
||||
@Test
|
||||
public final void givenCriteriaQuery_whenSearchedUsingCriteriaBuilderWithListofAuthors_thenResultIsFilteredByAuthorNames() {
|
||||
List<String> titles = new ArrayList<String>() {
|
||||
List<String> titles = new ArrayList<>() {
|
||||
{
|
||||
add("Manager");
|
||||
add("Senior Manager");
|
||||
|
|
|
@ -3,9 +3,9 @@ package com.baeldung.hibernate.optimisticlocking;
|
|||
import java.io.IOException;
|
||||
import java.util.Arrays;
|
||||
|
||||
import javax.persistence.EntityManager;
|
||||
import javax.persistence.LockModeType;
|
||||
import javax.persistence.OptimisticLockException;
|
||||
import jakarta.persistence.EntityManager;
|
||||
import jakarta.persistence.LockModeType;
|
||||
import jakarta.persistence.OptimisticLockException;
|
||||
|
||||
import org.hibernate.SessionFactory;
|
||||
import org.junit.After;
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
package com.baeldung.hibernate.pessimisticlocking;
|
||||
|
||||
import com.baeldung.hibernate.HibernateUtil;
|
||||
import com.vividsolutions.jts.util.Assert;
|
||||
import org.locationtech.jts.util.Assert;
|
||||
|
||||
import org.hibernate.SessionFactory;
|
||||
import org.junit.AfterClass;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Test;
|
||||
|
||||
import javax.persistence.*;
|
||||
import jakarta.persistence.*;
|
||||
import java.io.IOException;
|
||||
import java.util.Arrays;
|
||||
|
||||
|
@ -46,7 +46,7 @@ public class BasicPessimisticLockingIntegrationTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void givenRecordWithPessimisticReadQuery_whenQueryingNewOne_PessimisticLockExceptionThrown() throws IOException {
|
||||
public void givenRecordWithPessimisticReadQuery_whenQueryingNewOne_PessimisticLockExceptionThrown() {
|
||||
try {
|
||||
EntityManager entityManager = getEntityManagerWithOpenTransaction();
|
||||
Query query = entityManager.createQuery("from Student where studentId = :studentId");
|
||||
|
|
|
@ -6,9 +6,9 @@ import org.hibernate.SessionFactory;
|
|||
import org.junit.AfterClass;
|
||||
import org.junit.Test;
|
||||
|
||||
import javax.persistence.EntityManager;
|
||||
import javax.persistence.LockModeType;
|
||||
import javax.persistence.PessimisticLockScope;
|
||||
import jakarta.persistence.EntityManager;
|
||||
import jakarta.persistence.LockModeType;
|
||||
import jakarta.persistence.PessimisticLockScope;
|
||||
import java.io.IOException;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Arrays;
|
||||
|
@ -36,7 +36,7 @@ public class PessimisticLockScopesIntegrationTest {
|
|||
|
||||
// EXTENDED SCOPE
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("javax.persistence.lock.scope", PessimisticLockScope.EXTENDED);
|
||||
map.put("jakarta.persistence", PessimisticLockScope.EXTENDED);
|
||||
|
||||
EntityManager em3 = getEntityManagerWithOpenTransaction();
|
||||
foundEmployee = em3.find(PessimisticLockingEmployee.class, 1L, LockModeType.PESSIMISTIC_WRITE, map);
|
||||
|
@ -65,7 +65,7 @@ public class PessimisticLockScopesIntegrationTest {
|
|||
|
||||
// EXTENDED SCOPE
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("javax.persistence.lock.scope", PessimisticLockScope.EXTENDED);
|
||||
map.put("jakarta.persistence", PessimisticLockScope.EXTENDED);
|
||||
|
||||
EntityManager em3 = getEntityManagerWithOpenTransaction();
|
||||
foundCustomer = em3.find(Customer.class, 1L, LockModeType.PESSIMISTIC_WRITE, map);
|
||||
|
@ -96,7 +96,7 @@ public class PessimisticLockScopesIntegrationTest {
|
|||
|
||||
// EXTENDED SCOPE
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("javax.persistence.lock.scope", PessimisticLockScope.EXTENDED);
|
||||
map.put("jakarta.persistence", PessimisticLockScope.EXTENDED);
|
||||
|
||||
EntityManager em3 = getEntityManagerWithOpenTransaction();
|
||||
foundCourse = em3.find(PessimisticLockingCourse.class, 1L, LockModeType.PESSIMISTIC_WRITE, map);
|
||||
|
|
|
@ -4,10 +4,9 @@ import org.junit.After;
|
|||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
import javax.persistence.EntityManager;
|
||||
import javax.persistence.EntityManagerFactory;
|
||||
import javax.persistence.Persistence;
|
||||
import java.io.IOException;
|
||||
import jakarta.persistence.EntityManager;
|
||||
import jakarta.persistence.EntityManagerFactory;
|
||||
import jakarta.persistence.Persistence;
|
||||
import java.util.List;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
@ -17,7 +16,7 @@ public class JPASerializableIntegrationTest {
|
|||
private static EntityManager entityManager;
|
||||
|
||||
@Before
|
||||
public void setUp() throws IOException {
|
||||
public void setUp() {
|
||||
EntityManagerFactory entityManagerFactory = Persistence.createEntityManagerFactory("com.baeldung.hibernate.serializable.h2_persistence_unit");
|
||||
entityManager = entityManagerFactory.createEntityManager();
|
||||
entityManager.getTransaction().begin();
|
||||
|
@ -63,7 +62,7 @@ public class JPASerializableIntegrationTest {
|
|||
entityManager.persist(account);
|
||||
entityManager.persist(account2);
|
||||
|
||||
List userAccounts = entityManager.createQuery("select a from Account a join fetch a.user where a.user.email = :email")
|
||||
List<Account> userAccounts = entityManager.createQuery("select a from Account a join fetch a.user where a.user.email = :email", Account.class)
|
||||
.setParameter("email", email)
|
||||
.getResultList();
|
||||
assertEquals(2, userAccounts.size());
|
||||
|
|
|
@ -2,7 +2,6 @@ package com.baeldung.hibernate.transaction;
|
|||
|
||||
import com.baeldung.hibernate.HibernateUtil;
|
||||
import com.baeldung.hibernate.pojo.Post;
|
||||
import com.baeldung.hibernate.transaction.PostService;
|
||||
import org.hibernate.Session;
|
||||
import org.hibernate.SessionFactory;
|
||||
import org.junit.BeforeClass;
|
||||
|
@ -10,7 +9,6 @@ import org.junit.Test;
|
|||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.util.Properties;
|
||||
|
||||
|
|
|
@ -4,8 +4,8 @@ import com.baeldung.persistencecontext.entity.User;
|
|||
import com.baeldung.persistencecontext.service.ExtendedPersistenceContextUserService;
|
||||
import com.baeldung.persistencecontext.service.TransctionPersistenceContextUserService;
|
||||
|
||||
import javax.persistence.EntityExistsException;
|
||||
import javax.persistence.TransactionRequiredException;
|
||||
import jakarta.persistence.EntityExistsException;
|
||||
import jakarta.persistence.TransactionRequiredException;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
|
|
@ -55,32 +55,16 @@
|
|||
<artifactId>h2</artifactId>
|
||||
<version>${h2.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.sun.xml.bind</groupId>
|
||||
<artifactId>jaxb-core</artifactId>
|
||||
<version>${com.sun.xml.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.xml.bind</groupId>
|
||||
<artifactId>jaxb-api</artifactId>
|
||||
<version>${javax.xml.bind.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.sun.xml.bind</groupId>
|
||||
<artifactId>jaxb-impl</artifactId>
|
||||
<version>${com.sun.xml.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<properties>
|
||||
<!-- Spring -->
|
||||
<org.springframework.version>5.0.2.RELEASE</org.springframework.version>
|
||||
<org.springframework.data.version>1.10.6.RELEASE</org.springframework.data.version>
|
||||
<org.springframework.version>6.0.6</org.springframework.version>
|
||||
<org.springframework.data.version>3.0.3</org.springframework.data.version>
|
||||
<!-- persistence -->
|
||||
<hibernate.version>5.2.10.Final</hibernate.version>
|
||||
<hibernate.version>6.1.7.Final</hibernate.version>
|
||||
<tomcat-dbcp.version>9.0.0.M26</tomcat-dbcp.version>
|
||||
<com.sun.xml.version>2.3.0.1</com.sun.xml.version>
|
||||
<javax.xml.bind.version>2.3.1</javax.xml.bind.version>
|
||||
<com.sun.xml.version>4.0.2</com.sun.xml.version>
|
||||
<h2.version>2.1.214</h2.version>
|
||||
</properties>
|
||||
|
||||
|
|
|
@ -4,16 +4,16 @@ import java.io.Serializable;
|
|||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.persistence.CascadeType;
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.GenerationType;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.JoinColumn;
|
||||
import javax.persistence.JoinTable;
|
||||
import javax.persistence.ManyToMany;
|
||||
import javax.persistence.Table;
|
||||
import jakarta.persistence.CascadeType;
|
||||
import jakarta.persistence.Column;
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.GeneratedValue;
|
||||
import jakarta.persistence.GenerationType;
|
||||
import jakarta.persistence.Id;
|
||||
import jakarta.persistence.JoinColumn;
|
||||
import jakarta.persistence.JoinTable;
|
||||
import jakarta.persistence.ManyToMany;
|
||||
import jakarta.persistence.Table;
|
||||
|
||||
@Entity
|
||||
@Table(name = "Employee")
|
||||
|
|
|
@ -4,12 +4,12 @@ import java.io.Serializable;
|
|||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.ManyToMany;
|
||||
import javax.persistence.Table;
|
||||
import jakarta.persistence.Column;
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.GeneratedValue;
|
||||
import jakarta.persistence.Id;
|
||||
import jakarta.persistence.ManyToMany;
|
||||
import jakarta.persistence.Table;
|
||||
|
||||
@Entity
|
||||
@Table(name = "Project")
|
||||
|
|
|
@ -21,61 +21,60 @@
|
|||
<module>blaze-persistence</module>
|
||||
<module>core-java-persistence</module>
|
||||
<module>core-java-persistence-2</module>
|
||||
<module>deltaspike</module>
|
||||
<module>elasticsearch</module>
|
||||
<module>flyway</module>
|
||||
<module>flyway-repair</module>
|
||||
<module>hbase</module>
|
||||
<module>hibernate5</module>
|
||||
<module>hibernate-mapping</module> <!-- long running -->
|
||||
<!-- <module>hibernate-mapping</module> FAILED --> <!-- long running -->
|
||||
<module>hibernate-mapping-2</module>
|
||||
<module>hibernate-ogm</module>
|
||||
<module>hibernate-annotations</module>
|
||||
<!-- <module>hibernate-ogm</module>
|
||||
<module>hibernate-annotations</module> FAILED -->
|
||||
<module>hibernate-exceptions</module>
|
||||
<module>hibernate-libraries</module>
|
||||
<module>hibernate-jpa</module>
|
||||
<module>hibernate-queries</module>
|
||||
<module>hibernate-enterprise</module>
|
||||
<!-- <module>hibernate-queries</module> FAILED -->
|
||||
<!-- <module>hibernate-enterprise</module> FAILED -->
|
||||
<module>influxdb</module>
|
||||
<module>java-cassandra</module>
|
||||
<!-- <module>java-cassandra</module> FAILED -->
|
||||
<module>java-cockroachdb</module>
|
||||
<module>java-jdbi</module>
|
||||
<module>java-jpa</module> <!-- long running -->
|
||||
<module>java-jpa-2</module> <!-- long running -->
|
||||
<!-- <module>java-jpa</module> FAILED --> <!-- long running -->
|
||||
<!-- <module>java-jpa-2</module> FAILED --> <!-- long running -->
|
||||
<module>java-jpa-3</module>
|
||||
<!-- enable it when persistence-modules is migrated to JDK9+ -->
|
||||
<!-- <module>java-mongodb</module>--> <!-- long running -->
|
||||
<module>java-mongodb-2</module> <!-- long running -->
|
||||
<module>java-mongodb-3</module> <!-- long running -->
|
||||
<module>java-mongodb-queries</module> <!-- long running -->
|
||||
<module>jnosql</module> <!-- long running -->
|
||||
<!-- <module>jnosql</module> FAILED --> <!-- long running -->
|
||||
<module>jooq</module>
|
||||
<module>jpa-hibernate-cascade-type</module>
|
||||
<module>liquibase</module>
|
||||
<module>orientdb</module>
|
||||
<module>persistence-libraries</module>
|
||||
<module>querydsl</module>
|
||||
<module>r2dbc</module>
|
||||
<!-- <module>querydsl</module> FAILED -->
|
||||
<!-- <module>r2dbc</module> FAILED -->
|
||||
<module>read-only-transactions</module>
|
||||
<module>redis</module>
|
||||
<!-- <module>redis</module> FAILED -->
|
||||
<!-- <module>sirix</module> --> <!-- We haven't upgraded to java 11. Fixing in BAEL-10841 -->
|
||||
<module>solr</module>
|
||||
<module>spring-boot-persistence-2</module>
|
||||
<!-- <module>spring-boot-persistence-2</module> FAILED -->
|
||||
<module>spring-boot-persistence-3</module>
|
||||
<module>spring-boot-mysql</module>
|
||||
<module>spring-boot-persistence</module>
|
||||
<module>spring-boot-persistence-h2</module>
|
||||
<module>spring-boot-persistence-mongodb</module>
|
||||
<!-- <module>spring-boot-persistence-mongodb</module>
|
||||
<module>spring-boot-persistence-mongodb-2</module>
|
||||
<module>spring-boot-persistence-mongodb-3</module>
|
||||
<module>spring-boot-persistence-mongodb-3</module> FAILED -->
|
||||
<module>spring-data-arangodb</module>
|
||||
<module>spring-data-cassandra</module>
|
||||
<module>spring-data-cassandra-test</module>
|
||||
<module>spring-data-cassandra-reactive</module>
|
||||
<!-- <module>spring-data-cassandra-reactive</module> FAILED -->
|
||||
<module>spring-data-cosmosdb</module>
|
||||
<module>spring-data-couchbase-2</module>
|
||||
<!-- <module>spring-data-couchbase-2</module> FAILED -->
|
||||
<module>spring-data-dynamodb</module>
|
||||
<module>spring-data-eclipselink</module>
|
||||
<!-- <module>spring-data-eclipselink</module> FAILED -->
|
||||
<module>spring-data-elasticsearch</module>
|
||||
<!-- <module>spring-data-gemfire</module> Won't Fix in JAVA-14499, The dependencies used are -->
|
||||
<!-- no longer available or maintained. Ref: https://spring.io/projects/spring-data-gemfire#overview -->
|
||||
|
@ -89,24 +88,24 @@
|
|||
<module>spring-data-jpa-query</module>
|
||||
<module>spring-data-jpa-query-2</module>
|
||||
<module>spring-data-jpa-query-3</module>
|
||||
<module>spring-data-jpa-repo</module>
|
||||
<!-- <module>spring-data-jpa-repo</module> FAILED -->
|
||||
<module>spring-data-jpa-repo-2</module>
|
||||
<module>spring-data-jdbc</module>
|
||||
<module>spring-data-keyvalue</module>
|
||||
<module>spring-data-mongodb</module>
|
||||
<!-- <module>spring-data-mongodb</module> FAILED -->
|
||||
<module>spring-data-mongodb-2</module>
|
||||
<module>spring-data-mongodb-reactive</module>
|
||||
<module>spring-data-neo4j</module>
|
||||
<!-- <module>spring-data-neo4j</module> FAILED -->
|
||||
<module>spring-data-redis</module>
|
||||
<!-- Moved to JDK9+ profiles-->
|
||||
<!-- <module>spring-data-rest</module>-->
|
||||
<module>spring-data-rest-2</module>
|
||||
<module>spring-data-rest-querydsl</module>
|
||||
<module>spring-data-solr</module>
|
||||
<module>spring-hibernate-3</module>
|
||||
<module>spring-hibernate-5</module> <!-- long running -->
|
||||
<module>spring-jpa</module>
|
||||
<module>spring-jpa-2</module>
|
||||
<!-- <module>spring-hibernate-3</module> FAILED -->
|
||||
<!-- <module>spring-hibernate-5</module> FAILED --> <!-- long running -->
|
||||
<!-- <module>spring-jpa</module>
|
||||
<module>spring-jpa-2</module> FAILED -->
|
||||
<module>spring-jdbc</module>
|
||||
<module>spring-jooq</module>
|
||||
<module>spring-mybatis</module>
|
||||
|
@ -115,8 +114,8 @@
|
|||
|
||||
<properties>
|
||||
<!-- persistence -->
|
||||
<hibernate.version>5.2.17.Final</hibernate.version>
|
||||
<postgresql.version>42.2.20</postgresql.version>
|
||||
<hibernate.version>6.1.7.Final</hibernate.version>
|
||||
<postgresql.version>42.5.4</postgresql.version>
|
||||
<hsqldb.version>2.3.4</hsqldb.version>
|
||||
<testcontainers.version>1.16.3</testcontainers.version>
|
||||
</properties>
|
||||
|
|
13
pom.xml
13
pom.xml
|
@ -367,8 +367,8 @@
|
|||
|
||||
<module>muleesb</module>
|
||||
|
||||
<module>persistence-modules</module>
|
||||
<module>web-modules</module>
|
||||
<module>persistence-modules/deltaspike</module> <!-- delta spike it doesn't yet the jakarta API-->
|
||||
</modules>
|
||||
|
||||
</profile>
|
||||
|
@ -562,8 +562,8 @@
|
|||
<module>lombok-modules</module>
|
||||
<module>muleesb</module>
|
||||
|
||||
<module>persistence-modules</module>
|
||||
<module>web-modules</module>
|
||||
<module>persistence-modules/deltaspike</module> <!-- delta spike it doesn't yet the jakarta API-->
|
||||
</modules>
|
||||
|
||||
</profile>
|
||||
|
@ -821,9 +821,7 @@
|
|||
<module>libraries-testing</module>
|
||||
<module>maven-modules</module>
|
||||
<module>optaplanner</module>
|
||||
<module>persistence-modules/sirix</module>
|
||||
<module>persistence-modules/spring-data-cassandra-2</module>
|
||||
<module>persistence-modules/spring-data-jpa-repo-3</module>
|
||||
<module>persistence-modules</module>
|
||||
<module>quarkus-modules</module>
|
||||
<module>spring-reactive-modules</module>
|
||||
<module>spring-swagger-codegen/custom-validations-opeanpi-codegen</module>
|
||||
|
@ -1073,9 +1071,7 @@
|
|||
<module>libraries-testing</module>
|
||||
<module>maven-modules</module>
|
||||
<module>optaplanner</module>
|
||||
<module>persistence-modules/sirix</module>
|
||||
<module>persistence-modules/spring-data-cassandra-2</module>
|
||||
<module>persistence-modules/spring-data-jpa-repo-3</module>
|
||||
<module>persistence-modules</module>
|
||||
<module>quarkus-modules</module>
|
||||
<module>spring-reactive-modules</module>
|
||||
<module>spring-swagger-codegen/custom-validations-opeanpi-codegen</module>
|
||||
|
@ -1257,6 +1253,7 @@
|
|||
<byte-buddy.version>1.12.13</byte-buddy.version>
|
||||
|
||||
<!-- logging -->
|
||||
<!-- overwriting in the slf4j and logback in the hibernate-jpa. When updated to the latest version remove the version from that module-->
|
||||
<org.slf4j.version>1.7.32</org.slf4j.version>
|
||||
<logback.version>1.2.7</logback.version>
|
||||
|
||||
|
|
Loading…
Reference in New Issue