Questions tagged as 'jpa-2.0'

1
answer

JPA - Error of record not found soon after insertion of same

A question regarding JPA procedures, due to an error that has happened and I can not understand. I'm taking care of a part of the system that feeds a card order table. It looks up if the user that the request references has the card, and it i...
asked by 24.04.2015 / 22:04
1
answer

What are the cascade types in JPA?

I'm looking for information on the cascade types that exist and how they work in relational modeling with JPA. The types I found explanations were: NONE = Do not do anything with the object (default) MERGE = Update children when updat...
asked by 28.03.2017 / 22:35
1
answer

JPA subselect in MANYTOMANY

I'm developing a system with java + jpa + mysql but now I have a question that I still can not find the answer ... Given the tables and entities below, I would like to set up a jpql to perform the following query in native SQL: SELECT * FROM p...
asked by 24.09.2015 / 20:20
1
answer

JPA does not reflect the changed data in the DB manually

I have a JavaFX application with Hibernate (JPA). In this application I update a TableView with the data I search from BD (MySql). Whenever I click on the system to fetch some data in the DB, it executes the following code: public Task&l...
asked by 27.01.2016 / 16:55
2
answers

OneToOne Mapping JPA 2.2 Unidirectional

Hello, everyone. I'm using JPA + hibernate 4 on top of the database structure (MySQL 5.6) below. I'm in doubt about the @OneToOne relationship. What's happening: Entity BodyPart has a @OneToOne relation with Body...
asked by 04.11.2016 / 14:52
1
answer

How to test the service layer

I'm developing a multi-layered and multi-module web design. For the persistence layer I am using JPA 2.1 and hibernate 4.2 and for the JUnit 4 tests. In this architecture my project was divided into classes: GenericDAO (interface); Generic...
asked by 19.01.2015 / 01:21
2
answers

Using the JPA repository

Last Saturday I presented my CBT in college and saw that I need to improve the project presented. The system receives invoices in XML format and handles them. I took as a base the system in the company where I do internship. It uses Prime...
asked by 04.02.2014 / 16:29
2
answers

How to make Hibernate "notice" that the value of a column has been set by the database

My table in the database has a column that is populated automatically by the database itself. This table is mapped as a class annotated with @Entity, called EntidadeA . The column that is populated automatically is mapped to a property...
asked by 17.02.2014 / 19:15
1
answer

Slow Hibernate Search Index

This is a crosspost I did in stackoverflow in English. It is difficult to understand (and correct) this problem. I'll post it here to see if anyone in our community has ever been through this and knows what might be going on. What happ...
asked by 25.03.2014 / 02:27
1
answer

How to reproduce query with MySQL subqueries in hibernate?

I'm using JPA 2.0 and trying to reproduce this query in hibernate, but I can not figure out how to do it. I did in the language of Mysql SELECT totalassociado, totalcriticado, items.item_codigo_item, items.item_data_...
asked by 19.03.2014 / 15:00