Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

Tagged with
0 votes
0 answers
6 views

Hibernate: Generate non-id value from sequence

I have an entity with 2 fields which both use the same sequence, but when debugging I see that only the id field value is being generated: @Table(name = "MY_TABLE") public class MyEntity { ...
Clayn's user avatar
  • 29
0 votes
0 answers
45 views

Fix naming convention to remove underscores from Hibernate JPA

Without any changes it was prepending the class UserProfile and BaseModel id (user_profile_id). What I wanted was just ID in the table. When I changed to use <property name="...
JustinKSU's user avatar
  • 5,009
-1 votes
0 answers
11 views

Row updated in another transaction error unless there is a breakpoint on the save method

I have 2 methods that update an entity and have similar functionality, but I have inherited the codebase with little testing so don’t want to do a refactor yet. However, there is a bug in one of these ...
iamsimonsmale's user avatar
0 votes
1 answer
16 views

JPA Subquery return object and use on query multiselect

I'm have a java spring application that use a criteria query. The query has a multiselect and one of the values is a subquery that bring an complete entity. The application work on original enviroment ...
Felipe Schultz's user avatar
-1 votes
2 answers
39 views

any scenario's to use @Transactional annotation at Repository delete method?

I am reveiewing the code for one of the senior member for the first peer review so he added @Transactional annotation at custom repository with delete method. The custom Repository delete method is ...
Anil Nivargi's user avatar
  • 1,663
0 votes
0 answers
28 views

How to Convert a Complex SQL Query to Hibernate Criteria API

I'm learning about Hibernate's Criteria API and would like to know how to convert this particular SQL query to Criteria API. Here is the SQL query I’m working with: select s1.score as score,count(s1....
random guy's user avatar
-2 votes
0 answers
127 views

Unable to open JDBC Connection for DDL execution ["encrypt" property is set to "true" and "trustServerCertifi

10:12:20 PM: Executing ':ReportingApplication.main()'... > Task :compileJava UP-TO-DATE > Task :processResources UP-TO-DATE > Task :classes UP-TO-DATE > Task :ReportingApplication.main() ...
Ruslan Şirbidov's user avatar
0 votes
1 answer
61 views

Spring Data JPA - Programmatically Create JPA Repository Not Saving Data

Creating a JPA repository "on the fly" does not seem to work for saving entities (with or without transaction management). Yet it works fine for retrieving data. No error is thrown. With SQL ...
timbar's user avatar
  • 106
-2 votes
1 answer
53 views

Hibernate forces foreign key to be non-null

I want a Product to have an optional ProductType. But during schema generation, Hibernate for some reason ignores my definition and creates a non-nullable column for a foreign-key. We are using ...
Japu_D_Cret's user avatar
1 vote
1 answer
48 views

Why does enum cause type mismatch when saving in postgresql from JPA?

I have a user object defined as such @Entity @Table(name = "user_account") public class User { public enum Role { CLIENT, ADMIN } @Id @GeneratedValue(...
benwl's user avatar
  • 436
1 vote
0 answers
43 views

Column <name> is of type json but expression is of type smallint[]

There is field of json type in postgres db named data_processing_steps. It's defined in category entity as @Type(JsonType.class) @Column(columnDefinition = "json") private Set<...
Lesha Pipiev's user avatar
  • 3,301
0 votes
0 answers
45 views

JPA repository findBy return different result when using H2 and MySQL

This is the simply version of my application. I have 2 entity. Customer.java package com.udacity.jdnd.course3.critter.user; import java.util.List; import java.util.ArrayList; import com.udacity.jdnd....
user26256859's user avatar
0 votes
0 answers
20 views

[spring-boot]open api can't be stored in mysql database

bonjour, I have a unsolvable problem ... help me I downloaded XML open api file and parsed that in spring boot. Even though mysql db was successfully connected, data wasn't stored in my db table. Only ...
김렁뚱땅's user avatar
0 votes
0 answers
40 views

Why is spring not inserting value into ID column

I am trying to successfully map two classes in an OneToOne relationship; mainly because my User class needs two Ids that are GeneratedValue. I've used Lombok for getter setters and constructors ; I'm ...
Ribash Sharma's user avatar
-2 votes
2 answers
61 views

Java Spring Boot JPA database connection issue

Im working on Java Spring Boot application, and have a problem with connection to database via JPA. JPA cannot connect to my db. I tried many url configurations, but connection failed and such ...
koszatree's user avatar

15 30 50 per page
1
2 3 4 5
771