Tagged Questions

The Java Persistence API (JPA) is a Java specification for accessing, persisting, and managing data between Java objects/classes and a relational database. It is part of the EJB 3.0 specification and is the industry standard approach for Object to Relational Mapping (ORM).

I am trying to create an EAR application that contains (EJB,JPA an dynamic web project), when I start to annotate my classes with @Entity,@Table and other jpa annotations I get errors as what, eclipse ...

Here is the sample project where the exception is reproduced.
This sample illustrates the issue when many concurrent transactions are modifiying Account balance. Account can have many Card entities ...

Our project involves hundreds of tables/entities, so it's boring to create a single repository for every entity. We want to create a generic repository for common query use which might have a below ...

I have next question.
There are two entities with bidirectional @OneToMany association. For example Company and Employee. One company may have many employees.
I need to remove certain employee. Ok, I ...

I need to implement Historization in the sense that we must have a new record for any updated record. All records have a deleted and inserted date. So what we do is set the deleted date to NOW when ...

We are using a standard javaee architecture: users works through thin web client with application server. The server contains several linked business services, which works with the database through ...

I am trying to join to different entities from the same table using a constant value in the join statement. In SQL, I would do something like this...
SELECT *
FROM owner o
JOIN types t on t.owner_id ...

I need to use one database for queries (non-modifying) and one for commands (modifying). I am using Spring Data JPA, so I have two configuration classes:
@Configuration
@EnableJpaRepositories(value = ...

i have already seen the similar questions and havent been able to figure it out from them
i have two beans they have a unidirectional onetoone relationship.
the table below contains a forigen key to ...

I trying to use hibernate as JPA implementation in my web application. I have spent several hours dealing with this problem. I have following directory structure http://i62.tinypic.com/345bqlt.png.
...

I have a table patient_details(patient_id, first_name, last_name, address,date_of_birth, gender, contact_number,occupation). I have generated an entity class and a PersistenceUnit. I can only find an ...

I am working on a Spring boot (MVC, JPA) application and it is required to return different attributes on different requests. I found the @JsonView annotation and it seems to work. But do I need to ...

I need to have a List of clasess that are Persistence Entities, I need have Entity Information, using Reflection API of JPA
I have the EntityManager, But I do not know if that is the way.
I want to ...

I have one of my entity where I need to set manually the ID (PK).
I have some Abstract @MappedSuperclass used for Audit and PK and I want still to use it. So my idea was to override the id column to ...

I have a function "checkPatientId" that takes as argument a "patient_id" and returns "Valid" if the patient_id exists in the table "patient_personal_details" or returns "Invalid" if it doesn't exist.
...

I am refering to my last question to this topic which you can find here: MySQL Syntax Error by combining CASE and LIMIT (only sometimes) - generated by JPA
The error stil occurs but I found out some ...

I'm about to implement a two level deep inheritance hierarchy of Entities. There will be few millions records in my table(s) that will imported and read. Modification will be rare. Which Discriminator ...

working with OpenJPA2 persistence. I have a very simple entity class, that does have a String property and a List property. I do persist its instances flawlessly with the nested List (in a JSF2 web ...

I'm using Spring JPA in conjunction with Hibernate to create a service that simply extracts JSON data from the body of a POST request, and writes that data to a mysql database.
I've implemented the ...