Category "jpa"

Creating JPA session for background threads

We use Hibernate through JPA and Spring to manage object persistence in our web application. We use open-session-in-view pattern to create sessions for threads

JPA CRITERIA QUERY with order by joined columns

How to invoke order by on a joined entity? I am trying to achieve the following with: select * from person p inner join telephone t on p.id=t.person_id join si

IllegalArgumentException: At least one JPA metamodel must be present

while starting with spring rest I got following error as > org.springframework.beans.factory.BeanCreationException: Error > creating bean with name 'jpaM

Hibernate not persisting enums (as String)

I'm trying to do simple thing, save with Hibernate enum value as string. My mapping looks like this: @Entity @Table(name = "CONTRACTOR") public class Contracto

Drools flow persistence - Named query not found: ProcessInstancesWaitingForEvent

I have a problem with drools flow persistence (MySQL), I get the following exception: 2011-04-15 14:38:27,244 INFO [STDOUT] (http-0.0.0.0-8000-5) Hibernate: i

JPA, get all elements

I'm using JPA and I get all elements from DB in this code: factory = Persistence.createEntityManagerFactory(PERSISTENCE_UNIT_NAME); EntityManager em = factory

Hibernate throws org.hibernate.AnnotationException: No identifier specified for entity: com..domain.idea.MAE_MFEView

Why am I getting this exception? package com.domain.idea; import javax.persistence.CascadeType; import javax.persistence.Entity; import javax.persistence.Fetc

JPA Repository.findById() returns null but the value is exist on db

I'm developing Spring boot project, using JPA. What I wanna know is repository.findById(id) method returns null, whereas data is available in the DB. Functions

Error creating bean with name 'entityManagerFactory'

I have a web application that uses spring, hibernate and JPA. When I want to run my DAO unit tests, I get the following error: Caused by: org.springframewo