Questions tagged as 'jpa'

1
answer

Use clause "WHERE IN ()" IN SPRING BOOT JPA?

Does anyone know how I can use some clause similar to WHERE IN in spring jpa ? example: @Modifying @Transactional @Query(value = "Delete from table where id in(:ids)",nativeQuery=true) void deleteByIdid(@Param("ids") String...
asked by 18.03.2016 / 18:28
1
answer

Update column and table definitions with Hibernate

Good afternoon. I would like to know and confirm if you have any way to update table and column definitions in each schema using Hibernate. For now, what I've seen so far is that Hibernate only creates tables and columns, but does not dele...
asked by 06.03.2015 / 18:10
1
answer

detached entity passed to persist

I have the following problem to persist a screen where I have a relationship from many to many, in the case of workgroup_function, I have a screen that registers the workgroup and a picklist that registers the employees of the group Work. src="h...
asked by 04.03.2015 / 15:44
1
answer

Difference of service, repositories and controller

   What is the difference between services, repositories and controller in JPA. I know that repositories work with data abstraction. Who takes the data from the bank? The mapped classes (@Entity), and the controller and the service?     
asked by 04.09.2015 / 14:41
3
answers

Call database function that receives a list as parameter

People like I do the following ... involves database (Postgres SQL) and JPA, I want to create a database function that gets a list of ids as parameter and make a query cm in the WHERE IN (. ..). In JPA how do I call this function, and how do I p...
asked by 20.10.2018 / 15:21
1
answer

Error generating Id automatically in hibernate

I am making an application with hibernate, but it is generating and error: "ids for this class must be manually assigned before calling save ()" The class that is saying it is wrong is like this. @Entity @Table(name = "USER") public clas...
asked by 01.09.2018 / 19:09
1
answer

Querying in a List (IN) - Predicate and Specification - JPA CriteriaBuilder

Hello, I have to create a dynamic query based on the following scenario in a RESTFUL application using Springboot and JPA (I'm using JpaSpecificationExecutor): I have two entity classes (Entity), the first is that of products: Produto Long i...
asked by 06.05.2018 / 20:23
1
answer

JPA Cascade Persistence

I'm trying to perform a cascading persistence using JPA. I have the entity: Course and Module 1 Course can have multiple Module @Entity(name = "course") public class Course extends BaseEntity { private static final long serialVersion...
asked by 09.05.2018 / 18:51
1
answer

DataSource PostgreSQL Widlfly

I'm trying to set a DataSource with PostgreSQL , but it's throwing this Exception 23:36:46,381 ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 2) WFLYCTL0013: Operation ("deploy") failed -...
asked by 25.10.2017 / 04:48
2
answers

javax.servlet.ServletException: java.lang.ExceptionInInitializerErro

I'm trying to create my first project using JPA, I use Jboss 5, Oracle, Hibernate and primefaces. After doing the project deploy I try to create and inseir a new client in the bank through the web interface, but I am getting the following error:...
asked by 14.07.2017 / 05:11