Spring-data-jpa Questions
Ad
Failed to convert property value of type java.lang.String to required type java.util.Date for property dateEmp;
A java ee project using spring framework (spring-boot).
JPA - Write a "Reverse" like Predicate (like operator applied on column instead of inparam) - Oracle DBMS
I need to write a "reverse" like condition with jpa predicate over oracle dbms. the example query i need to build is:
TransactionRequiredException when updating with Jpa Repository
On succesfull authentication i'd like to make a call to db to retrieve some additional info but i get:
Spring Boot : mapping between entity and database not working.(Getting {} in response body)
I'm trying to create a webservice but when i try to get records from database(mariadb), the response is being shown as {} and does not show the
Spring-Boot MVC JPA Filters
Let me start by saying i'm fairly new to spring boot so apologies if i'm making a silly mistake somewhere. i am trying to retrieve the value of my
More sort column in JHipster
I try to configure sort column using the rout.ts file of my entity. in the "data" tag i put defaultsort:
What is the most efficient way of updating multiple records in Oracle with same value
We have a batch job that needs to update millions of rows (not all rows) of a table with a particular value. we have the following
H2 - Hibernate not inserting Default column values on SQL INSERT
I'm developing a service and currently working on 2 of its entities (section and gradelevel) while i'm still developing,
Can I find by a list of IDs instead the classic findById() in Spring Data JPA?
I am working on a spring boot project using spring data jpa and i am wondering if exist a nice and elegant solution to the following use case.
How can I correctly implement a Spring Data JPA repository method retrieving all the objects related to a list of object? (not to a single one)
I am working on a spring boot application using spring data jpa and i have the following problem. i have this eventlog
Ad
One-Many Relationship in Jpa
I want to get data from my entity with 1-m relationships. users have an entity for cv information.with jparepo, cv class : @entity
How to use deleteById jpa repository if my id is a String?
I need to delete an entity using its id, tried using jpa repository delete by id method productrepository.deletebyid(id);
JPA/Hibernate Entity show only some fields on GET
I have an entity that has many fields mapped to columns in my database using the @entity and @column annotations. columns might include something
Understanding Relationship Cascading with Merge
Deep diving into spring jpa and i have troubles to understand whats going on here. this is the code: entity
Check existence of multiple IDs with Spring Data JPA
Analogous to the built-in method existsbyid i'd like to hava an existsallbyid method with spring data jpa. to achieve
The Parent entity inside child entity pull the child again
When i try to fetch the child entity, it also gets the parent entity because of one to many bidirectional mapping but the parent entity inside the
Android room relations
I have two entities that looks like this (simplified for reading purposes). @entity public class machine { @primarykey
QueryDSL 4.1.4, Jpa GROUP BY Date
I have troubles on grouping my query by date. i need to consolidate some data in daily manner in querydsl 4.1.4. there is almost none
class path resource [org/quartz/impl/jdbcjobstore/tables_h2.sql] cannot be opened because it does not exist
I am trying to use h2 database to test my quartz application which is running using spring boot. my application.properties looks like this :
Spring JPA data: Querydsl in eclipse giving compilation error while using query dsl classes
I have added below query dsl plugin in eclipse to generate qdsl classes. while using dsl classes in my repository its giving complication
Query annotation for spring-data-jpa
Hy all, i would like to know what is wrong with my custum query using spring data jpa. if i use
Ad
@Primary JpaRepository not used for @Autowired
I have the simplest of spring configuration cases so i don't know why i don't find how this is done. i have an interface
LazyInitializationException: could not initialize proxy - no Session
I use spring-data-jpa with spring-boot(v2.0.0.release), i just wrote a crud demo on mysql, but an exception occurs
Spring Data JPA query method 'Desc' not recognized
I have the following domain object: public class quizz { private long id; private date when; private long userid; }
Can I define the Entity Listeners in the Same Entity Class?
E.g., will the below code run properly? or do i have to define a separate entity listener for each and every entity class? @entity
What is a viable alternative to getOne(long id) in Spring
I am writing an update method in spring service and it says the getone() is deprecated, i have reviewed alternatives and the
How to filter a @OneToMany mapped field in spring data JPA?
I am trying to build an expense tracker application using spring boot rest api. the following are the entity classes i have created. user
Unable to build Hibernate SessionFactory; nested exception is org.hibernate.MappingException: Could not determine type for: java.util.Set, at table:
I want to create jpa repository for spring authorization server using this code:
Multiple Spring JPA relationships between 2 entities
I have 2 entities, one for a tasklist and the other for users. the users can create tasks for themselves or their friends, so in the tasks entity
Spring Boot OpenAPI 3 with Spring Data REST
I'm failing at documenting my spring data rest api with openapi. nothing show in swagger-ui's homepage (and /v3/api-docs obviously). here
Spring Data cannot fetch a record using UUID in postgresql
I am using spring data to manage a rest api. all tables in my postgresql database has a primary key of type uuid. i am able to persist this data
Spring Data JPA - bidirectional relation with infinite recursion
First, here are my entities. player : @entity
Ad
no setter methods in generated mapstruct implementation
I'm experimenting with mapstruct and follow this tutorial:
How to make a JPA query use primitive ID instead of managed instance?
I tried but i couldn't find a better title so it looks weird but the question is actually very simple... i have a jpa query which uses a
Post method and String value in Java Spring
I'm trying to post a text from home.html template <form th:action="@{/process_addtext}"
Java Spring JPA Pagination Not working if more than one Page
I'm trying to use jpa pagination with custom query. pagination is working if match with 2 cases. case 1 : if data
Working with indexes when using Spring boot + Postgresql
I know that i can create an index for both a single column and a composite one. a also i can make an
Nested entities contains null after save
I have an entity with some nested entities like this public class myentity { @manytoone
Result from JPA project is null
I have these postgres tables: create table deals_new ( id bigserial primary key, slip_id text,
how to deserialize one to many relationship with both eager sides without ending up in infinite deserialization loop
Here is my product class @entity public class product { @manytoone(fetch=fetchtype.eager)
What is a good way to handle an Optional<User> object returned by a Spring Data JPA repository in a situation like this?
I am working on a spring boot application. into a service class i have this service method: @override public user
Spring Data Rest - Self link of association resource
This is the json-response of a get-reqeust: { ... "_links": { "self": { "href":
Failed to auto-configure a DataSource: 'spring.datasource.url' is not specified
I have created a basic spring boot application from spring initializr with the web, mongodb and jpa dependencies. when i
Ad
Why this Spring Data JPA query by name method gives me this error and Eclipse forces me to return an Optional<User> instead a simple User object?
I am working on a spring boot project using spring data jpa and hibernate mapping. in my repository classes i am using a query by method
n+1 issue in one to one relation with Lazy Loading
My question is when an null ability occur in one to one relation even my child class primary key same like parent class primary key so when
Repository annotation is not working on Spring data JPA
I am building a spring-boot application where i am using spring data jpa feature. please find below my dao layer code
How to check if table contains column in JPA - Criteria API?
I joined two tables and get different columns from both tables to load them into datatable. i want to order the columns by using datatable but how
Can I use Java 16 record with JPA entity?
I am trying to do something similar like below. @entity @table(name="sample") public record sample(integer id, string
How can I retrieve all the children of a record in this Hibernate @ManyToOne relation?
I am working on a spring boot project using spring data jpa and hibernate mapping. i have the following doubt about how can i implement the
Spring Data JPA findOne() change to Optional how to use this?
I'm learning springboot2.0 with java8. and i followed some blog-making tutorial example. the tutorial
Jpa Criteria API count
I've been trying to get total rows count and to do so, i've used jpa criteria api but it throws an error at long count =
Spring Boot 2: How to configure HikariCP using application.properties file
I am relatively new to spring and spring boot but i can't seem to find a guide on how to create an app using spring boot, flyway, and spring boot
java spring repositories - findBy() method using set of IDs/values
I have a java spring app. it does back end stuff, offering a restful api, all using an oracle database. for most resources, it follows a
does spring data jpa do caching
I've got a simple repository that looks like this public interface playerlevelrepository extends crudrepository<playerlevel,
Ad
Cannot resolve reference to bean 'entityManagerFactory' while setting constructor argument
I just migrate to spring jpa technology and manage to change my simple jersey-hibernate project to spring jpa with custom crudrepository. but i
@RequestMapping not getting the parameters and values.Spring framework
I am trying to create an api with crud operations. for this created a user bean and a userrepository which extends crudrepository. i
Question marks in place of unicode(Hindi ) characters in JPA query in Spring?
I am using hindi characters in where clause in jpa query .when i print the queries in connsole using show jpa the chars are being replaced by
Spring Data JPA (MySQL) saves String in exponential form rather than as a number
I save phone number in database using spring data jpa , in model i define this private string directphone; while
why does my code throw a "bean not managed exception"?
My code has been working fine with just a single repository package, until i began adding more repository & entity packages in my data source
Spring: multiple transactions
I am developing an application with spring boot and spring-data-jpa, where i have a method which does two things: it saves into a
Spring Boot CrudRepository or JpaRepository - how to pass limit as argument?
I have repository interface which extends crudrepository: public interface examplerepository extends
How can I implement a JPQL query retrieving all the user having a specific type (implemented using a MANY TO MANY relation)?
I am working on a spring boot project and i am not so into hibernate/jpa and i have the following doubt about how can i use it to perform the
How to filter null values in ArrayList
I have a very big code. i faced an issue where at very starting of code, null gets inserted inside arraylist custlist i.e custlist
How to write custom between spring data JPA query?
I have an entity @entity public class promoamtrange implements serializable { @id @generatedvalue(strategy
No data type for node: org.hibernate.hql.internal.ast.tree.MethodNode
I have an springboot app with this query @transactional @modifying @query("update hoteldailyprice cdp set cdp.price =
Ad
Why I can't effect READ_UNCOMMITTED Isolation in my test
I's just want to test the transactional annotation support by spring with spring data jpa,and spring boot. here's my controller
Create multiple tables with same domain in jpaRepository
I have one @table domain and want to create multiple tables using that. how can i do it with jparepository. @table
PostgreSQL query works on pgAdmin but not in Spring Boot
The query select * from books where (isbn || ' ' || author || ' ' || name) ilike '%el%' returns
Does JPA framework saves One-To-Many Relationship automatically?
Suppose i've one-to-many relationship:
Spring - CrudRepository is not created
The crudrepository bean @repository public interface userdao extends crudrepository<user, long> {
Use Spring Data JPA without Spring Boot application
i wanted to know if it is possible to use the spring data jpa without the rest of the spring framework? i used spring data jpa in a spring
Get total count rows for Pageable custom query in Spring repository
I implement pagination like this: list<products> products =
Spring Data Jpa - ManyToMany - delete entities of the join table
I have these two classes : public class classa extends [...] implements [...] { @manytomany(fetch = fetchtype.lazy, cascade =
Many-to-Many with extra column (Hibernate 4)
I know in order to have extra column on many-to-many relationship, i need to create a new table and a new class for that. the problem is i cannot
Ad
Blog Categories
Ad