Questions tagged as 'hibernate'

1
answer

Update all schemas with multitenancy architecture

Good morning. Next, I have a multitenancy application using Hibernate with JPA. We recently deployed the multitenancy architecture and in persistence.xml was configured to automatically update the default schema when deployed to the project,...
asked by 16.02.2015 / 12:55
1
answer

How to do custom query with JPA + Hibernate

Hello, I would like to know an elegant way to make a custom query using JPA . Basically I want to run the query and return it to an object list, but usually it will be a query with N tables and only with the fields I will need. I und...
asked by 15.01.2015 / 18:59
2
answers

Retrieving list of outdated objects with Hibernate

When I manually enter an object in MySQL via terminal, Hibernate does not retrieve the list with the updated object, it is always the same as the last query, as if it were taken from a cache. I tried to do this but it did not work. public...
asked by 21.11.2014 / 14:00
1
answer

Problem with table extension in Postgresql, Person and Physical Person

I'm making an application that has a people register, it's a Person CRUD that can be both physical and legal. the problem is that in my design a Pessoa and a Pessoa Fisica should be created in the database, but it is creating only...
asked by 20.04.2014 / 03:32
1
answer

How to reduce JSF application CPU consumption

From time to time, my application started to have a very large CPU consumption. I installed JProfiler, and from what I understand of it, there is a problem with hibernate's c3p0. I'm using hibernate 4.3, jsf2.2.10 + primefaces 5.2, use ehcache a...
asked by 29.08.2018 / 00:24
1
answer

Hibernate Initialization

Is it possible to disable the check that Hibernate does every time the app starts? That is, the moment I create the table classes and the hedge columns, it is normal that the first time the app runs hibernate create the tables according to en...
asked by 29.09.2014 / 23:27
1
answer

You are not creating with "persist"

SEVERE: Servlet.service() for servlet [Spring MVC Dispatcher Servlet] in context with path [/cq] threw exception [Request processing failed; nested exception is javax.persistence.TransactionRequiredException: No EntityManager with actual transact...
asked by 01.06.2018 / 22:46
1
answer

Correct creation of tables

Given my classes where Encomenda inherits from Objeto : @Entity @Table(name = "objeto") @XmlRootElement(name = "objeto") @XmlAccessorType(XmlAccessType.FIELD) @AllArgsConstructor @NoArgsConstructor public class Objeto implements S...
asked by 07.04.2017 / 00:04
1
answer

What is optimistic locking field of JPA

What is and what is JPA's Optimistic Locking Field? I noticed that this option exists for Eclipse Link and for Hibernate and this function is enabled when annotating a version attribute within an entity class, but I do not understand what its pu...
asked by 21.03.2017 / 14:44
1
answer

Mapping classes HIBERNATE

Well, I have a question about an exercise that was passed in the facul recently. I have to map classes with JPA, Hibernate and I'm having a bit of trouble in mapping the relationships of those classes. The problem is this, the exercise is a...
asked by 06.09.2016 / 16:54