All Questions
2,515
questions
0
votes
0
answers
8
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 {
...
0
votes
1
answer
28
views
How to Handle Indexes for @MapsId in JPA: Should FK and PK Share the Same Index?
I am using the @MapsId annotation in JPA to map a foreign key (FK) to a primary key (PK). According to the @MapsId annotation, the FK and PK share the same value. However, when I checked the database ...
0
votes
0
answers
22
views
JPA @Procedure multiple out parameters
Here is my working code:
public interface CandidatRepository extends JpaRepository<Candidat, String> {
@Procedure(procedureName = "garnuche.INSCRIPTION_TEST")
...
1
vote
1
answer
50
views
Ordinal enum mapping with Hibernate 6.5
I'm upgrading Hibernate from 6.1.7 to 6.5.2, there are many enum columns in my entities marked with
@Enumerated(EnumType.ORDINAL). My codebase has to run against both Oracle and SQL Server.
The ...
0
votes
0
answers
27
views
How to find out which column is failing if type is number and it exceeds the length in JPA insert operation
I am trying to insert a record in a Oracle 11g table which have around 100 columns.
repository.saveAndFlush(nextObj);
When i am inserting JPA is throwing exception like below, it not telling me ...
1
vote
2
answers
51
views
ORA-00997 illegal use of Long datatype while selecting data with Spring Data JPA
I recently updated an application to SpringBoot 3.2 with Hibernate 6 and encountered and issue selecting data by using repository.findById() out of an Oracle database with column type LONG RAW ...
0
votes
0
answers
28
views
Map Oracle JSON columns using JPA and Hibernate, ignore if value is null
@Type(type = "io.hypersistence.utils.hibernate.type.json.JsonType") @Column(name="Emp") private String Emp;
Error while execute empRepo.save(empEnity) (Emp is null)
SQL Error: ...
1
vote
0
answers
43
views
Hibernate session.get for String to Oracle CHAR query fails due to padding
We've Oracle DB which stores the data column using CHAR data type. Hibernate entity of the same has been mapped to java.lang.String.
Java 8
Hibernate 5.6.15
Oracle Database 19c
DB
"ACCOUNT_NO&...
1
vote
1
answer
24
views
Hibernate problem in Oracle handling edge Double values
I'm testing the handling of basic Java values with Hibernate and Oracle. I have an Oracle table with a binary_double column, and I want to insert from Java the value Double.MAX_VALUE, which happens to ...
0
votes
0
answers
15
views
Spring data native with project get a proxy result
I use spring data jpa, for one query, i use native query
public interface EditorDto {
Long getEditorId();
String getName();
}
@Query(value = """
select e1_0.editor_Id ...
-1
votes
1
answer
40
views
Hibernate ConstraintViolationException on SELECT query because of cached INSERT statement
I have this Hibernate select query that gives me a ConstraintViolationException.
Method:
public RfaSchoolWorkflow findViaCasePrepForm(CasePrepForm model) {
TypedQuery<RfaSchoolWorkflow> ...
0
votes
1
answer
104
views
Can't launch my Spring Boot App after adding some database options
I started getting this error after trying to connect my Spring Boot application to an Oracle DB. This was running completely fine before and I could bring up my main page and navigate between pages ...
0
votes
0
answers
41
views
could not get next sequence value
error while saving the value in DB, I can able to get the value from DB(one column I have manually inserted with ACCOUNTSUBSCRIPTIONKEY value as 1) but not able to save the value.
org.springframework....
1
vote
2
answers
181
views
Spring Boot with Oracle Sequence - 2 different applications get colliding SEQUENCE.NEXTVAL causing ORA-0001 unique constraint violation on primary key
I have 2 applications (one is SpringBoot app and another is a C++ app) calling the same Oracle sequence SEQUENCE_A responsible for generating PK on the same table TABLE-A.
The sequence DDL is as:
...
0
votes
1
answer
54
views
Hibernate with Oracle and database-links
For a monitoring solution, I need to connect to a oracle database, that has multiple database links. For simplifiaction I call them master and nodes.
In Oracle, you can define a database-link within a ...