Questions tagged [spring-boot-jpa]

96 questions
2
votes
1 answer

The stored procedure call with cursors throws invalid column name exception

We have a Spring Boot application where we need to connect to Oracle DB and fetch data via stored procedures. Each of our stored procedure has REF_CURSOR as OUT parameters. I am trying the same using @NamedStoredProcedureQuery and @Entity…
2
votes
2 answers

NativeQuery mapping with @SqlResultSetMapping with multiple @Entity classes, is it possible?

I have a situation where I have a single native query which contains data of 2 entity classes, how can I map that data to the entity classes by @SqlResultSetMapping? For Example Native query:- select customer.name, address.area from customer,…
Sumanth
  • 159
  • 2
  • 15
2
votes
1 answer

Facing 'NoClassDefFoundError: org/springframework/data/repository/config/BootstrapMode' issue while running the tests

These are the spring related jars added in my pom.xml file org.springframework.data spring-data-jpa 2.2.0.RELEASE
2
votes
1 answer

How can I use Spring boot data JPA with MySql8 Collections? Will Spring boot data JPA support it?

I want to use spring boot data JPA with MySql 8 collections. MySql8 has already provided with XDevApi but I want to configure it with Spring boot data JPA. Mysql XDevApi given in below link…
2
votes
1 answer

Spring Boot Hibernate JPA mapping composite primary key gives IllegalArgumentException: This class does not define an IdClass

I have configured composite primary key for my entity UserActivity as follows with composite key on msisdn & extReferenceId. Both are annotated with @Id in my entity. The IdClass is UserActivityId and it is annotated too as below. When I start the…
2
votes
1 answer

Spring JPA composite PK with one auto-incremented

I'm trying to persist an entity with a composite primary key, one of which should be auto-incremented, using Spring Boot 2.1.2.RELEASE + JPA (using starters) and MySQL (InnoDB). I have an abstract class with 2 non-abstract subclasses and I'm using…
2
votes
1 answer

What is a compatible version of spring-boot-starter-data-jpa for spring-data-geode?

Can someone help me find a compatible version of spring-boot-starter-data-jpa for spring-data-geode in Spring Boot version 2.1.4.RELEASE? This is for an application running an embedded cache server with write-behind implementation connecting to an…
2
votes
1 answer

Many-To-One Association in Spring JPA does not update related entity

I have a problem inserting JPA entites in the DB using a many-to-one association. I'm using: Spring Boot 2.1.4.RELEASE Ecliselink 2.7.4.RC2 (org.eclipse.persistence.jpa) spring-boot-starter-data-jpa I'm using Spring's repository where I only…
1
vote
0 answers

Spring Boot JPA join columns with a partial composite key

I have entity classes like this structure: Class Parent { @EmbededId private ParentId id; @OneToMany(fetch=FetchType.LAZY, cascade=CascadeType.ALL, mappedBy="parentDetails") private List childDetails; ... } @Embeddable Class…
Lolly
  • 34,250
  • 42
  • 115
  • 150
1
vote
1 answer

Spring JPA Shared primary key causes org.hibernate.AssertionFailure: null identifier

I'm making a spring boot application with a MySQL database, and I'm trying to set something up like this example (simplified for the question) where some optional entities can hold extra data about a user. This is the simplified example I've…
TheINCGI
  • 35
  • 5
1
vote
1 answer

One to One relationship mapping JPA SpringBoot implementation error: ids for this class must be manually assigned before calling save()

I am trying to understand the JPA Spring Boot implementation for One-to-One mapping classes and was hoping if anyone could provide me a clear picture. One to One mapping Scenario: Table foo and Table childfoo Foo has the columns foo_id,foo_name,…
user6090970
  • 185
  • 1
  • 3
  • 14
1
vote
0 answers

Encountering PSQLException when trying to get entry from Postgres database

I have an entity class below. As an important that, user_config column keeps JSON based user configuration so that I had to annotate the variable with @Lob. @Id @GeneratedValue(strategy = GenerationType.AUTO) private Long id; @Column(name =…
oisleyen
  • 92
  • 2
  • 8
1
vote
1 answer

org.springframework.dao.InvalidDataAccessApiUsageException: Parameter value [false] did not match expected type [java.lang.Boolean (n/a)];

Entity: @MappedSuperclass @Data public abstract class Account { @Id @GeneratedValue(strategy = GenerationType.SEQUENCE) private Integer id; ... private boolean status; ... } …
Oleg Pavlyukov
  • 151
  • 1
  • 11
1
vote
1 answer

Spring boot join query Validation failed for query for method public abstract in using three entity

I have using spring boot. I have used to join three entity to fetch data in repository.But it shows bellow error.. Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'menuRightRepo': Invocation of init…
Enamul Haque
  • 4,789
  • 1
  • 37
  • 50
1
vote
0 answers

Using spring boot JPA features in plain Java project

I want to have a plain java project making use of spring boot JPA support, like JpaRepository, to make a library which I can inject into other spring boot projects for database operations. Is it possible?
Mandroid
  • 6,200
  • 12
  • 64
  • 134