Questions tagged as 'hibernate'

1
answer

How to manipulate multiple banks with Hibernate?

I'm testing Hibernate and I ran into a question. I have the following configuration: hibernate.cfg.xml <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration...
asked by 30.11.2018 / 15:47
2
answers

How to avoid LazyExceptions?

My application faces numerous LazyExceptions issues and what causes a "filth" in the server log. I understand that they occur because the connection to the database has already been closed and I am trying to recover some attribute / object that...
asked by 26.01.2018 / 19:49
0
answers

How to implement Flyway in a JavaEE Maven project with Hibernate, vRaptor and JPA?

In a Maven, JPA, with Hibernate and vRaptor integrated project, how to implement the Flyway easily and effectively? Implementing this, my bank will upgrade as it was in the development <property name="hibernate.hbm2ddl.auto" value="upd...
asked by 08.05.2018 / 23:03
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
1
answer

Why is hibernate deleting before saveOrUpdate ()?

I have a m: n relation between Column and Element. The entity that owns the relationship is Column. however when I'm saving a map of Columns, the following scenario occurs: 1) In the first iteration, Hibernate: 1.1) saves the first Column...
asked by 23.02.2018 / 14:32
1
answer

What dependencies do I need to add to Glassfish folders?

Talk about it! I'm using the Hibernate framework in my JSF project. On the computer I'm developing it's all right, running though, when I try to deploy to the glassfish server on another machine it starts giving some errors saying that the cl...
asked by 06.12.2015 / 17:30
1
answer

Relate entity with more than one entity

Hello, I have the following Client, Vendor and Financial entities in my system. All of them have a list of Contacts, as would a two-way relationship in these ways. public class Client { @OneToMany private List<Contact> contacts }...
asked by 24.07.2015 / 19:36
1
answer

Duplicate mapping error: org.hibernate.DuplicateMappingExceptionn

I'm using Hibernate 5 and am having the following problem: Caused by: org.hibernate.DuplicateMappingException: duplicate import: br.edu.unifeob.entidades.apuracao.Avaliacao refers to both br.edu.unifeob.entidades.apuracao.Avaliacao and br.edu....
asked by 14.08.2015 / 14:22
1
answer

Hibernate Cache with select count

Hello I have a JPQL query, with count : public Long quantidadeFaturasAbertasAssinante(Integer idAssin){ return manager.createQuery("select count(f) from Fatura f where f.dataLiquidacao IS NULL and f.assinante.id = :ass", Long...
asked by 11.10.2016 / 21:06
1
answer

What is the simple way to create a WebService Rest from an existing Java Web Dynanic project? [closed]

Talk to people I'm a beginner in the java world and I created a Web Dynamic project where I use Hibernate, PrimeFaces and TomCat. Everything is working, screens, registers (CRUD) and stuff. Only now I want to turn it into a webservice so I ca...
asked by 10.06.2015 / 21:26