hibernate Questions

8

Solved

I am new in Spring Application with Gradle. Running my project to create the database objects based on my classes created, i got the following error: Exception in thread "main" org.springframework...
Eadith asked 4/11, 2015 at 10:34

8

Solved

I am trying to map a PostgreSQL custom type,named transmission_result, to a Hibernate/JPA POJO. The PostgreSQL custom type is more or less an enum type of string values. I have created a custom Enu...
Vincevincelette asked 29/9, 2011 at 21:18

4

Solved

I need to get META information of All the tables present in my schema dynamically , Meta infos are such as table , entity ,column name etc. I have followed the following tutorial https://vladmiha...
Penates asked 24/7, 2018 at 14:38

6

Solved

I wrote a little Spring project based on mariadb, hibernate, spring-boot and other common libraries in Eclipse. When I run my application normally, it completes its startup in about ten seconds: 2...
Fellowman asked 7/11, 2019 at 19:5

3

Solved

What JPA + Hibernate data type should I use to support the vector extension in a PostgreSQL database, so that it allows me to create embeddings using a JPA Entity? CREATE TABLE items (id bigserial ...
Finial asked 26/6, 2023 at 5:30

1

What would be the best way to support the pgvector vector extension in a PostgreSQL database using Spring-Boot 3 with Hibernate 6, so I can create vector embeddings using a JPA entity? CREATE TABLE...
Vaughan asked 13/9, 2023 at 17:40

3

To persist I use Hibernate 6 and use on the entity: @JdbcTypeCode(SqlTypes.JSON) private String value; When you save to the database, save wrapped in quotes and inside the json escape the quotes: ...
Middendorf asked 18/8, 2022 at 17:30

2

I'm trying to update existing table with hbm2ddl.auto = update. There is several columns in several tables where database column definitions changes from declaration in entities. Like @Column(name...
Trichromatism asked 12/4, 2013 at 18:26

6

I've these two simple entities Something and Property. The Something entity has a many-to-one relationship to Property, so when I create a new Something row, I assign an existing Property. Somethin...
Ia asked 3/8, 2017 at 18:4

11

Solved

During a Hibernate Session, I am loading some objects and some of them are loaded as proxies due to lazy loading. It's all OK and I don't want to turn lazy loading off. But later I need to send so...
Contrite asked 7/2, 2010 at 9:31

2

I'm working on a postgresql base that use pgcrypto to encrypt some columns of the base. Java side, I use JPA to "map" my classes to my database. Currently, to encrypt and decrypt fields in java I...
Savanna asked 29/8, 2018 at 12:20

4

Solved

I am looking for a solution to dynamically build queries using Spring Data JPA. I have a GameController which has a RESTful service endpoint /games which takes 4 optional parameters: genre, platfor...
Turgor asked 28/11, 2014 at 17:13

4

Solved

Searched for a few hours, but I'm stuck in a my learning curve for PlayFramework with JPA. I'm building a sample website where posts can be made. But these posts can have the states: PostDraft (p...
Latticework asked 8/10, 2011 at 22:4

6

Solved

This is the error that occurs when i try to execute my spring boot api to generate the database : org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManag...
Nace asked 16/6, 2023 at 12:16

10

Solved

I tried to implement a REST service with Java, Hibernate, and Spring, which returns JSON. I have map a many to many relation. I have a supplier that has a list of ingredients, and each ingredient h...
Moraine asked 5/1, 2018 at 15:56

1

Solved

The hibernate 6.2 depreciated "strategy". In our current code base we are using @GenericGenerator( name = "sequenceGenerator", strategy = "enhanced-sequence" ) How...
Fovea asked 12/3 at 8:47

3

Solved

I try to configure OneToMany and ManyToOne mapping in Spring Data project but have some issues. So I have two entities: Employer and Project. One Employer could have many projects. Entity classes...
Aoudad asked 1/7, 2015 at 21:29

2

I Googled around but don't see any tutorials for upgrading Hibernate to 5.2. The only thing I could find was this: http://hibernate.org/search/documentation/migrate/5.0/ but it seems to specific ...
Limey asked 18/6, 2018 at 12:18

4

Solved

I'd like to get the sql string from a CriteriaQuery using Hibernate 6. Query.getQueryString() does no longer work in Hibernate 6 for CriteriaQuery. SQLExtractor.from() dos not work either because ...
Arrhythmia asked 23/5, 2023 at 11:48

3

I am doing a Spring Boot course written in Spring Boot 2.19, Hibernate 5.3.12 and Java 8. I am using Java 17, Hibernate 6.1.6 and Spring Boot 3.0.2. I sorted many things that didn't match, but one ...
Sternforemost asked 5/2, 2023 at 18:41

2

I am using PostgreSQL and Hibernate 6, and I have a JSONB type column - values. The question is, how can I define an entity with generic type for this field? Also, is there any way to map the corre...
Validate asked 3/10, 2023 at 22:24

0

I need to get 20 users from the postgres database (without sorting), do some actions with them, and then delete them as part of the transaction. If I were using a native sql query, I would write li...

6

Solved

Can you please help me to map this class using Hibernate? public class MyClass{ private Long id; private String name; private int[] values; ... } I'm using PostgreSQL and the column type in ...
Goodell asked 2/12, 2010 at 6:57

9

Solved

How should model class's equals and hashcode be implemented in Hibernate? What are the common pitfalls? Is the default implementation good enough for most cases? Is there any sense to use business ...
Adventure asked 28/10, 2009 at 17:15

1

I have a Spring Boot application using Hibernate where I recently added new values to an enum ContactTypeConstant used in an entity class BlockItemEntity. The entity is mapped to a PostgreSQL datab...
Aquifer asked 9/11, 2023 at 19:30

© 2022 - 2024 — McMap. All rights reserved.