spring-data

Cannot create namespace in multi-document transaction(MongoDB 4.0, Spring Data 2.1.0, Spring Boot)

ⅰ亾dé卋堺 提交于 2021-01-20 07:20:52
问题 This question regarding to Spring boot, Mongo4.0, Spring-data application. I have upgraded from MongoDB 3.6.x to MongoDB 4.0 and Spring data 2.0.x to Spring-data 2.1.0 for transactional management while inserting data into multiple documents. But here I face this issue while creating a database, collection and inserting a document into the collection. Issue Cannot create namespace sampledb_200.demo in multi-document transaction Here sampldb_200 is database name and demo is the collection name

Cannot create namespace in multi-document transaction(MongoDB 4.0, Spring Data 2.1.0, Spring Boot)

Deadly 提交于 2021-01-20 07:20:20
问题 This question regarding to Spring boot, Mongo4.0, Spring-data application. I have upgraded from MongoDB 3.6.x to MongoDB 4.0 and Spring data 2.0.x to Spring-data 2.1.0 for transactional management while inserting data into multiple documents. But here I face this issue while creating a database, collection and inserting a document into the collection. Issue Cannot create namespace sampledb_200.demo in multi-document transaction Here sampldb_200 is database name and demo is the collection name

How to remove Spring Data CustomConversions warnings from application startup?

被刻印的时光 ゝ 提交于 2021-01-03 05:08:52
问题 I have an application with the following Spring dependencies: starterBase : 'org.springframework.boot:spring-boot-starter:2.2.1.RELEASE', starterActuator: 'org.springframework.boot:spring-boot-starter-actuator:2.2.1.RELEASE', starterJpa : 'org.springframework.boot:spring-boot-starter-data-jpa:2.2.1.RELEASE', starterTest : 'org.springframework.boot:spring-boot-starter-test:2.2.1.RELEASE', starterWeb : 'org.springframework.boot:spring-boot-starter-web:2.2.1.RELEASE', elasticsearch : 'org

How to remove Spring Data CustomConversions warnings from application startup?

给你一囗甜甜゛ 提交于 2021-01-03 05:05:28
问题 I have an application with the following Spring dependencies: starterBase : 'org.springframework.boot:spring-boot-starter:2.2.1.RELEASE', starterActuator: 'org.springframework.boot:spring-boot-starter-actuator:2.2.1.RELEASE', starterJpa : 'org.springframework.boot:spring-boot-starter-data-jpa:2.2.1.RELEASE', starterTest : 'org.springframework.boot:spring-boot-starter-test:2.2.1.RELEASE', starterWeb : 'org.springframework.boot:spring-boot-starter-web:2.2.1.RELEASE', elasticsearch : 'org

How to remove Spring Data CustomConversions warnings from application startup?

故事扮演 提交于 2021-01-03 05:01:49
问题 I have an application with the following Spring dependencies: starterBase : 'org.springframework.boot:spring-boot-starter:2.2.1.RELEASE', starterActuator: 'org.springframework.boot:spring-boot-starter-actuator:2.2.1.RELEASE', starterJpa : 'org.springframework.boot:spring-boot-starter-data-jpa:2.2.1.RELEASE', starterTest : 'org.springframework.boot:spring-boot-starter-test:2.2.1.RELEASE', starterWeb : 'org.springframework.boot:spring-boot-starter-web:2.2.1.RELEASE', elasticsearch : 'org

Spring data repository sends null as bytea to PostgreSQL database

守給你的承諾、 提交于 2021-01-02 05:11:25
问题 After switching from MySQL to PostgreSQL I found out that my SQL query (@Query in spring data repository interface) does not work anymore. The issue is caused by null value being sent as bytea and I'm getting following exception: Caused by: org.postgresql.util.PSQLException: ERROR: operator does not exist: bigint = bytea Hint: No operator matches the given name and argument type(s). You might need to add explicit type casts. Repository with @Query: public interface WineRepository extends

How do you handle with bulk deleting by an array of IDs in Spring Data JPA?

折月煮酒 提交于 2020-12-28 06:59:47
问题 Now I have a class User, I get a request data of an array from the jsp or html . list this Integer[] arr=[5,6,9,10,62,52,21] and then I use two methods to finish bulking deleting action. @Transactional @Override public void deleteUser(Integer id) { oneRepository.delete(id); } @Transactional @Override public void deleteSomeUser(Integer[] ids) { for (Integer id : ids) { deleteUser(id); } } I want to know that if it's a more efficient method to finish this action. you can see my logs: it seems

How do you handle with bulk deleting by an array of IDs in Spring Data JPA?

别说谁变了你拦得住时间么 提交于 2020-12-28 06:56:40
问题 Now I have a class User, I get a request data of an array from the jsp or html . list this Integer[] arr=[5,6,9,10,62,52,21] and then I use two methods to finish bulking deleting action. @Transactional @Override public void deleteUser(Integer id) { oneRepository.delete(id); } @Transactional @Override public void deleteSomeUser(Integer[] ids) { for (Integer id : ids) { deleteUser(id); } } I want to know that if it's a more efficient method to finish this action. you can see my logs: it seems

How do you handle with bulk deleting by an array of IDs in Spring Data JPA?

青春壹個敷衍的年華 提交于 2020-12-28 06:54:06
问题 Now I have a class User, I get a request data of an array from the jsp or html . list this Integer[] arr=[5,6,9,10,62,52,21] and then I use two methods to finish bulking deleting action. @Transactional @Override public void deleteUser(Integer id) { oneRepository.delete(id); } @Transactional @Override public void deleteSomeUser(Integer[] ids) { for (Integer id : ids) { deleteUser(id); } } I want to know that if it's a more efficient method to finish this action. you can see my logs: it seems

Spring JPA :: No converter found capable of converting from type

心不动则不痛 提交于 2020-12-28 06:43:26
问题 I am using spring with JPA and trying to execute query using @query with SQL query.and trying to map the result to an object. I have different entity class and mapping to other dto as I do not want all the columns. getting below error No converter found capable of converting from type [org.springframework.data.jpa.repository.query.AbstractJpaQuery$TupleConverter$TupleBackedMap] to type [webapi.dto.StatsDTO]", Below is my repository interface public interface UserRepository extends