hibernate Questions
6
Solved
Project use Hibernate (JPA), Spring and Maven. My entity and DAO in a separate JAR.
pom.xml:
<project ...>
...
<artifactId>database</artifactId>
<dependencies>
<de...
2
I have a SpringBoot application with hibernate. In my tests I would like to disable any sort of db connection and configuration (tests don't have access to db). How should I do it ?
My test class ...
Gdynia asked 23/10, 2019 at 7:10
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
14
Solved
We are using Oracle as the database for our Web application. The application runs well most of the time, but we get this "No more data to read from socket" error.
Caused by: java.sql.SQLRecoverabl...
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
3
Solved
I'm having trouble with the ordering of the columns in my composite primary key. I have a table that contains the following:
@Embeddable
public class MessageInfo implements Serializable {
privat...
Militant asked 15/11, 2011 at 16:13
11
Solved
I created a project with following structure:
HibernateUtil:
public class HibernateUtil {
private static final SessionFactory sessionFactory = buildSessionFactory();
private static SessionF...
3
Solved
I have a class A{Set b .....} which holds references of class B as Set. It is one to many relationship.
Both class have sequencer in oracle. I put cascade to all in hibernate annotations. When i sa...
Plaza asked 16/9, 2010 at 7:53
4
Solved
We have a back-end component that exposes database (PostgreSQL) data via JPA to RESTful API.
The problem is that when sending a JPA entity as a REST response, I can see Jackson triggering all Lazy...
7
Solved
I have class that uses hibernate, I have included all required jars to classpath and class worked before Java updated itself. But now eclipse shows that it cannot resolve some hibernate imports. Wh...
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
It is a best practice to use constructor injection. However I can't acheive this with @PersistenceContext.
I would like to have the following constructor:
private final EntityManager entityManage...
Goosegog asked 1/2, 2019 at 11:51
12
Solved
I want to keep some data in H2 database by making a CRUD repository, using Hibernate.
I can't get the database to store my entries whatsoever. Currently, I'm trying to achieve that during updating...
Bullyboy asked 25/7, 2017 at 11:37
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
7
Solved
I am getting data from my form through a DTO and mapping it to my Hibernate entity. I wanted to skip a date field as the incoming data is all strings and I need to convert the string field into a d...
Unmeant asked 20/6, 2016 at 6:49
2
I'm migrating the spring boot parent version from 2.5.12 to 3.0.6 and I faced many issues that I could fix but I struggle with this one :
org.springframework.beans.factory.BeanCreationException: Er...
Caceres asked 16/6, 2023 at 19:44
7
Solved
I have a spring boot project using JPA, So I am trying to map two tables into a third one using their Id :
for example I have a coupon class, I have a customer class I want to take customer id and ...
Tabaret asked 28/8, 2019 at 11:29
6
Solved
When I try to delete an entry from a db, using
session.delete(object)
then I can the following:
1) If the row is present in DB then two SQL queries are getting executed: A select and then a d...
9
Solved
I want to perform data time operations using hibernate HQL.
I want to add and subtract two dates as well as I want to subtract 1 year or 1 month from a particular date.
How is this possible using...
2
Hello StackOverflow Community,
Attempted:
Upgrading Spring Boot from 2.7.5 to 3.0.0, which uses Hibernate ORM core version 6.1.5.Final
Entity
Plant.java
@Data
@Entity
public class Plant {
@Id
Lo...
Feathered asked 8/3, 2023 at 0:40
24
Solved
I'm trying to start a Spring Boot project with a MySQL database, but I have some problem with the database. I try to start my application that, and server is running, but Hibernate doesn’t create T...
Venegas asked 3/2, 2019 at 15:9
7
I am currently migrating a SpringBoot 2.7 application to SpringBoot 3. The following query is used within a SpringData repository:
@Query("select b from #{#entityName} b where (trunc(b.date) ...
Uninterested asked 10/12, 2022 at 13:36
6
How can I store logical expressions using a RDBMS?
I tag objects and would like to be able to build truth statements based on those tags. (These might be considered as virtual tags.)
Tags
new
for_s...
9
Solved
I have a method that does a bunch of things; amongst them doing a number of inserts and updates.
It's declared thusly:
@Transactional(propagation = Propagation.REQUIRED, isolation = Isolation.DEFAU...
10
Solved
...without actually reading and parsing the persistence.xml
I can retrieve the name of the persistence unit of an EntityManager using the properties of it's factory. I can retrieve the available d...
Turgid asked 14/9, 2012 at 11:48
© 2022 - 2024 — McMap. All rights reserved.