spring-data-jpa Questions
2
How can i use spring JPA Specification for where condition as below:
Where cond1 and (cond2 or cond3)
AND
Where (cond1 and cond2) or cond3.
Specification code is as below:
Specification<Do...
Countermarch asked 15/3, 2019 at 10:1
3
I have a native postgresql query (opts - jsonb array):
select * from table users jsonb_exists_any(opts, ARRAY['CASH', 'CARD']);
it works fine in my database console and I'm getting a result:
user1...
Rainbow asked 16/5, 2021 at 23:51
3
Solved
TestRepository extends JpaRepository<Test, Long>
JpaRepository is an interface. Why do we extend it and not implement it as we know in Java? As far as I know, interfaces are implemented, not...
Aguirre asked 15/11, 2019 at 16:36
4
Solved
My user DB table looks like this:
CREATE TABLE user (
username VARCHAR(32) PRIMARY KEY,
first_name VARCHAR(256) NOT NULL,
last_name VARCHAR(256) NOT NULL,
password VARCHAR(32) NOT NULL,
enabl...
Tyranny asked 5/3, 2016 at 17:50
6
I added ShedLock to my project to prevent working of scheduled job more than one time. I configured it like below but I'm getting
"org.postgresql.util.PSQLException: ERROR: relation "shed...
Venerate asked 29/9, 2021 at 17:1
3
Solved
I have a Role enum, like this:
public enum Role{
admin('a'),
member('m'),
pending('p');
char role;
Role(char a) {
this.role = a;
}
public char getRole() {
return role;
}
public static R...
Hypognathous asked 31/12, 2019 at 13:54
6
I want to use JPA with Spring on Wildfly. I tried this configuration:
application.properties:
spring.jmx.enabled=false
spring.datasource.jndi-name=java:/global/production
spring.datasource.driver...
Bedraggled asked 25/7, 2018 at 7:34
2
Solved
I have a builder that create a JPA Specification according to filters. How do I test the builder ? assertEquals method always return false when comparing Specifications...
I already try to call Sp...
Rhee asked 12/9, 2019 at 13:21
5
I have a model:
public class MyModel {
@Id private Long id;
private Long externalId;
// Getters, setters
}
I'd like to use externalId as my resource identifier:
@Configuration
static class R...
Peer asked 22/7, 2017 at 9:7
3
We have a fairly complex data model and are using Hibernate and Spring Data JPA on top of MySQL. We have a base class that all domain objects extend to minimize boiler plate code. I would like to b...
Worthless asked 5/1, 2012 at 15:42
1
I've got this query in a @SQLInsert annotation in Spring against an Oracle 11g database and, although it's inserting properly it is not updating the values but raising no error.
Any ideas? If not,...
Tichonn asked 29/1, 2019 at 10:37
8
I am trying to build a web application, I didn't add any classes or packages I have just ran the app but it says
java.lang.NullPointerException: Cannot invoke "org.hibernate.engine.jdbc.spi.Sq...
Forerunner asked 1/11, 2023 at 22:30
3
Solved
When I want make query in Intellij JPA console I get error that relation "topic" does not exist. Jpql query select t from Topic t. I'm using spring boot, I added jpa to module, persistence toolbar ...
Brogue asked 19/7, 2019 at 10:53
3
I am fighting trough one day with one problem.
So Lets get started. I have 3 classes like tags, offers and animals
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Entity
@Table(name = "anim...
Lichenin asked 18/1, 2019 at 12:39
3
Solved
I have an issue with loading data into an in-memory database on application initialization. I have created schema.sql and data.sql files containing table structure and initial data.
schema.sql :
...
Potiche asked 24/1, 2017 at 23:55
15
Solved
I have a Spring Boot Application with a couple Entity classes and I'm trying to implement database migrations with flyway. It appears that, on startup, Spring Boot is not running flyway at all.
He...
Enrichetta asked 5/5, 2020 at 17:53
3
Solved
I am using hibernate-envers with spring. Everything works just fine, except when I delete an entity, it does not change the values of updated_by and updated_date inside audit table, instead it save...
Grinder asked 13/11, 2019 at 8:48
4
Solved
Postgres defines additional jsonb Operators such as ?|.
However, using Spring JpaRepository query builder, interrogation character is always considered as a parameter, and I can't figure how to es...
Chimkent asked 22/5, 2018 at 9:53
10
I've been searching around and potentially the closest I've found something is this Stack Overflow thread, but it still doesn't answer my question. Even with the latest copy of spring (as of writin...
Strontianite asked 10/8, 2022 at 21:14
1
I am using Spring JPA with hibernate ORM project and want to integrate with ClickHouse.
I found some references of ClickHouse JDBC which is working
ClickHouseJDBCDemo ClickHouseJDBCDemo
but was...
Roswald asked 2/3, 2018 at 13:41
5
for some reason I have not being able to find a suitable answer for this. I have the following simple entity:
@Entity
@Table(name = "simple_entity")
@Access(AccessType.FIELD)
public class SimpleEn...
Ampliate asked 21/8, 2013 at 6:19
14
Solved
I have created a basic spring boot application from SPRING INITIALIZR with the Web, MongoDB and JPA dependencies.
When I try to run the spring boot application I am getting the following exceptio...
Dyslalia asked 25/3, 2018 at 11:14
5
Solved
I am trying to set up a spring rest api using hibernate. When trying to use the userRespository I set up I am getting this error
org.springframework.beans.factory.UnsatisfiedDependencyException: E...
Nominee asked 2/10, 2019 at 2:39
3
Solved
I am building a CRUD application where I am using spring data jpa to work with Database.
I don't want to give schema name in my entity class, like mentioned below.
@Entity
@Table(name = "PROPERT...
Deification asked 12/5, 2020 at 19:59
3
Solved
I've been trying to find a way to implement second-level caching using Spring Boot 3 + Ehcache 3 + Hibernate 6 but it's been an unsuccessful ride so far.
I tried looking it up on the internet but n...
Inept asked 13/3, 2023 at 9:7
1 Next >
© 2022 - 2024 — McMap. All rights reserved.