Skip to main content
AI Assist is now on Stack Overflow. Start a chat to get instant answers from across the network. Sign up to save and share your chats.
Filter by
Sorted by
Tagged with
0 votes
1 answer
60 views

I am working with a MySQL database and using Hibernate (6.6.0.Final) without Spring. My schema involves two tables, film and film_text, which are implicitly related in a one-to-one relationship. The ...
Dmytro Kostenko's user avatar
1 vote
1 answer
3k views

I was upgrading springboot 3.1 to 3.2.4 which uses hibernate 6.4.4.Final. I am getting the below error while building the mvn project- Error creating bean with name 'entityManagerFactory' defined in ...
Sj17's user avatar
  • 11
0 votes
1 answer
1k views

There are 'duplicate' questions regarding spring annotation 'inheritance', with resolute, but probably incorrect answer: NO(not inherited). Update: it's provably wrong. Annotations aren't inherited ...
Martin Mucha's user avatar
  • 3,269
0 votes
1 answer
116 views

I have an entity which is used by RepositoryItemWriter in a step and RepositoryItemReader in next step. I want to populate a value in entity class when it is loaded in the second step. that value is ...
Hesitha Wijayasinghe's user avatar
0 votes
1 answer
1k views

Upgraded my Hibernate dependencies from 5.6.11.Final to 6.1.7.Final, migrated to the jakarta packages and my project will no longer gradle build because it cannot locate org.hibernate.common:hibernate-...
Brian's user avatar
  • 13.6k
1 vote
0 answers
370 views

Here is a quick scenario. Environment Java 8 Spring boot 2.7.5 Hibernate 5.6.12.Final (comes with spring data JPA) My Entity @Entity @Getter @Setter @Table(name = "test_entity") public ...
VostanAzatyan's user avatar
1 vote
0 answers
107 views

I've a custom implementation of PropertyAccessor that only works if I declare it in the XML mapping file, but not when using field annotations in POJOs). I try the following: With hibernate-core (4.2)...
Javier Gil's user avatar
1 vote
1 answer
395 views

I have an entity like this, and I am failing on mapping the ID column of the second_table to chId of my entity, but in the case of dep_id mapping works fine Stacktrace is: nested exception is org....
Saigaduk's user avatar
0 votes
1 answer
148 views

after Hibernate upgrade 4.3.11.Final to 5.0.12.Final my test has stared failing with: org.hibernate.PropertyValueException: not-null property references a null or transient value : com.mypackage....
SaintNick's user avatar
0 votes
1 answer
194 views

Could someone help me to identify a solution, which would allow me to compute column's value on insert. I have tried different combinations with @Formula and @Genarated. Is this even possible ? If so ...
user3794642's user avatar
1 vote
1 answer
1k views

The question was to persist the following class using Hibernate . Public class Album{ Private int albumid; Private String aname; Private Map<String,List<String>> photos; } I have Tried ...
UtsavC's user avatar
  • 25
1 vote
0 answers
81 views

Guess this might be a difficult one. Well, at least for me. I need some help with JPA/Hibernate-Annotations and I was wondering, if there is a way to solve my problem. Unfortunately, my own skills ...
Tessaiga's user avatar
1 vote
1 answer
530 views

I tried searching for this specific issue but could not get any help While creating Employee --> Account should get created. My entities are --> Employee entity @Entity @Table(name = "...
Ashish Shetkar's user avatar
0 votes
1 answer
967 views

How to check only set of possible values for the String column in hibernate. @Column(name="delivery_type") private String deliveryType; I just want to accept only 1 value from these sets of two. ("...
Nilesh's user avatar
  • 51
5 votes
1 answer
6k views

I'm working with SQL Server and Spring Data JPA. I'm trying to get the uniqueidentifier type working, but it seems that it uses uuid_byte as the type instead of uuid_char. I saw other older posts that ...
Brandon's user avatar
  • 464
0 votes
1 answer
350 views

I have a CollectionTable looking like this: @ElementCollection @CollectionTable( name="FOO_FEES", joinColumns=@JoinColumn(name="FOO_ID", foreignKey=@ForeignKey(name="...
nix86's user avatar
  • 3,057
0 votes
0 answers
568 views

I am using Hibernate 4.3 and am trying to model the relationship within the entities of a legacy database that cannot be changed. I am trying to map a many-to-one relationship between Table B and ...
JNYRanger's user avatar
  • 7,115
-1 votes
3 answers
842 views

I have 2 tables Table a - id,b_id,name Table b - id , name when I have to make POJO Entity, I wanted to have b_id as a column and as well as foreign key to fetch values from b .
Krutarth Vora's user avatar
0 votes
0 answers
881 views

I try to understand which annotation for hibernate field have highest precedence. I use @Column, @Length and @Size for the same field and want to know which value will be taken to set column length in ...
konrado's user avatar
  • 255
0 votes
0 answers
265 views

We use Hibernate as ORM to map our entities to Database . All our Database query / transactions happens through entity . The Queries for Database (select/insert/update/delete) are generated by ...
Raj's user avatar
  • 21
0 votes
1 answer
245 views

I have two tables FoodAudit and IngredientAudit that mirror (plus some additional columns) the tables Food and Ingredient as part of a revisions system I am working on. Ideally, both of these tables ...
Caleb Whittington's user avatar
0 votes
0 answers
118 views

I have two tables employee and address , when using OnetoOne mapping only in employee entity ,it fetches correspondent address from address table. But when i try to use OnetoOne in address entity to ...
Santhosh M's user avatar
10 votes
3 answers
23k views

I have some annotation in a class such as public class ProductModel { @Pattern(regexp="^(1|[1-9][0-9]*)$", message ="Quantity it should be number and greater than zero") private String quantity; ...
Luis Rodriguez Ugarte's user avatar
1 vote
0 answers
2k views

I am using JPA and Hibernate 5. Normally, if an java bean is saved by Hibernate, I expect all the persisted values, including those generated ones, like ID, by database or by code, are populated on ...
WesternGun's user avatar
  • 13.1k
0 votes
0 answers
200 views

I'm trying to persist an Entity that has a Map as one of its values. To be more precise. I have the @Entity Request that have a compound primary key with three elements. This primary key is composed ...
andrea's user avatar
  • 49
2 votes
2 answers
23k views

I have spring java based configuration. HibernateConfiguration package com.app.surveyapp.configuration; import java.util.Properties; import javax.sql.DataSource; import org.apache.log4j.Logger; ...
Sangram Badi's user avatar
  • 4,304
2 votes
0 answers
942 views

I have two tables device_data and device_connection. I want to join these two tables on basis of column customerId. Both the tables have customerId column. DeviceData import java.io.Serializable; ...
Syed Khalid Ahmed's user avatar
0 votes
1 answer
956 views

The method addAnnotatedClass(Class) is undefined for the type Configuration I am trying to insert data into data base using Hibernate in my Dynamic web project . Annotations are used instead of XML ...
navya's user avatar
  • 3
1 vote
0 answers
16 views

I have a project with Hibernate annotations and annotation processing enabled in eclipse. Once I switch to JAVA 11 Open JDK, the annotation processing is not working. Below is the full error: ...
Shamal Karunarathne's user avatar
1 vote
0 answers
137 views

I am reviewing my Java skills and your support to the community is amazing, your tips have helped me a lot. I am stuck in a Hibernate @OneToOne configuration, it is a very simple design and code but ...
MAc's user avatar
  • 29
0 votes
1 answer
1k views

I have one column in my Entity Class like : @Column(name = "createdBy", nullable = false) private String createdBy; Later i need to update column name. Is there any way to update the column name ...
Piyush Desai's user avatar
3 votes
1 answer
351 views

public static List<Image> getList(int userId) { Session session = HibernateUtil.openSession(); Transaction tx = null; List<Image> results = null; try { tx = ...
HMT's user avatar
  • 2,281
3 votes
2 answers
2k views

What would be the equivalent of the following annotation usage in kotlin: @TypeDefs({ @TypeDef(name = "string-array", typeClass = StringArrayType.class), @TypeDef(name = "int-array", ...
JaviOverflow's user avatar
  • 1,480
1 vote
0 answers
526 views

Im trying to use a custom javax.validation Constraint annotation in order to set a violation of one of the fields held on the declaring objects field. For instance I have a car object @MyConstraint ...
Joe's user avatar
  • 129
0 votes
1 answer
228 views

I'm tried to create one-to-one relationship in hibernate, When I'm implement this relation then I'm getting org.hibernate.AnnotationException. Please identify the mistake And Suggest me. Vegetable ...
Ng Sharma's user avatar
  • 2,212
0 votes
1 answer
206 views

I need to change my database structure that way: move one field from @Audited entity to another @Audited entity with no loss of audit information. How can I migrate it? By liquibase migration I ...
Daria Bulanova's user avatar
0 votes
0 answers
56 views

I am developing a Q&A-style web application in which two of the entities are Question and Answer. A Question has-many Answers. In addition, an Answer has-many Answers (which I refer to as child ...
Daniel Trebbien's user avatar
1 vote
2 answers
2k views

I am new to Spring/JPA and I am trying to use Database relationship @annotations to simplify my code. I have two entities, a User and Token entity. When setToken() is called on the User, I want the ...
jden's user avatar
  • 2,328
0 votes
1 answer
708 views

I have a table as following CREATE TABLE labour_no_pk ( id bigint(20) NOT NULL AUTO_INCREMENT, name varchar(255) DEFAULT NULL, labour_id bigint(20) NOT NULL, contractor_id bigint(20) DEFAULT ...
Extreme 's user avatar
  • 3,499
0 votes
1 answer
365 views

My code was working just fine with the xml mapping then I changed to annotations and i get this error: Exception in thread "main" org.hibernate.InvalidMappingException: Unable to read XML This is my ...
Valentin Garcia's user avatar
1 vote
1 answer
59 views

I have three objects: A, B, and C. A has a one-to-many relationship with B. B has a one-to-many relationship with C. The classes are as follow: public class A { @OneToMany(fetch = FetchType....
Budzu's user avatar
  • 183
1 vote
1 answer
1k views

I am upgrading from Hibernate 4.3 to 5.2.13. I have a pattern where many entities inherit properties from an abstract class which is itself annotated. For example: Entity A: @AttributeOverride(name =...
Kramer's user avatar
  • 1,118
1 vote
1 answer
3k views

We just upgraded our JBoss from 6.1.0 to Wildfly 10.1, and made a variety of associated upgrades to modules and artifact versions and so on. In one module this caused our cobertura compiles to fail ...
Sinc's user avatar
  • 703
3 votes
0 answers
2k views

I have an spring boot applicaion that should be run on mysql in development environment and on sql server on production environment. so i want to set @GeneratedValue(strategy = GenerationType.IDENTITY)...
Rasool Ghafari's user avatar
5 votes
1 answer
6k views

I want to ask how to audit just a part of a superclass of entity, using hibernate annotations such as @AuditOverride, @Audited or else. Right now, I am using hibernate 5.2.12 version. The annotations ...
Dumbo's user avatar
  • 1,847
2 votes
0 answers
622 views

I am getting exception while stating of spring boot server. second table(XYZ) which I want to innerjoin has 2 keys(AGENTID,TERMID) and AGENTID is the primary key in both the tables. @Entity @Table(...
sai raghu's user avatar
0 votes
0 answers
771 views

I have a entity class that having Object type as variable how to write mapping for the same. @Entity @Table(name="demo") public class Transaction implements Serializable { @Id @...
Naveen Kumar Mishra's user avatar
3 votes
2 answers
4k views

I have a table with a column that has a UNIQUE constraint. I want the constraint checking to be deferred to commit time. If I create it using Postgres SQL like this (many columns omitted): CREATE ...
Dale Wilson's user avatar
  • 9,494
0 votes
1 answer
929 views

I am getting UnsatisfiedDependencyException in project and i have used all jars related with spring-mvc spring-tx hibernate mysql connector and all by using maven tool type Exception report ...
Anil Amane's user avatar
0 votes
1 answer
1k views

I am creating as API which send the response to Client in JSON format. What I am doing, I have a table In Mysql DB in that there is a primary key. Client request Data using that Primary Key as a ...
ansh's user avatar
  • 623

1
2 3 4 5
11