Questions tagged as 'hibernate'

1
answer

How do I make a left join with criteria with a n n mapped table in java?

I tried to do this, however, but it is returning null in the query. Anyone have any ideas how I can resolve this? public List<Pessoa> filtrar(Pessoa pessoa) { Session session = sessionFactory.getCurrentSession(); Criteria...
asked by 10.02.2017 / 11:56
1
answer

JPA error hibernate = foreign key is returning null

After much research, without success, I decided to post my doubts. I'm using JPA / Hibernate and I have two tables: a Pessoa and a Funcionário . The error occurs when I save my data, the foreign key pessoa_id is empty,...
asked by 01.07.2016 / 21:16
2
answers

Select in Hibernate does not return extended class

I have a class, Vendor, that is extended from class Pessoa . In method listarFornecedores of class FOrnecedorDao : public List<Fornecedor> listarFornecedores() { session = HibernateUtil.getSessionFactory().openS...
asked by 23.01.2017 / 13:39
2
answers

Hibernate Validator @CPF that can be null

I am using Hibernate Validator with the @CPF annotation. It is validating beauty, the problem is that my system may have the invalid CPF field (null) and Hibernate does not accept this. I put the field with @Collumn (nullable = true) but...
asked by 02.04.2016 / 07:07
1
answer

JPA / Hibernate Entity with Collection for itself

Hello, I have an entity named menu on my system. A menu can be a child of another menu and so on. The table has the following structure: Theentityismappedasfollows:@Entity@NamedQuery(name="Menu.findAll", query="SELECT m FROM Menu m") public...
asked by 02.02.2016 / 14:11
1
answer

Temporary table that hibernate creates

I'm using JPA and Hibernate 4.3.11 when running a simple application To test the connection to Firebird 2.5 Hibernate is generating A temporary table with the HT _ start. Example: created the Customer table and generated Hiberna...
asked by 21.08.2015 / 19:20
1
answer

JPA / Primefaces - Add / Remove records from a child table

I have a problem with a cadastral panel. There is a store network registry in which I am taking care of the implementation. I can normally insert and remove dataTable items, but this is not reflected in the base in the burning process - when...
asked by 30.11.2015 / 20:14
1
answer

Hibernate with multiple databases in the same application

A system uses a separate database for each client, let's say I have 500 clients, in which case my database server would have 500 data bases , for example: cliente1 cliente2 cliente3 In the Hibernate configuration, a Factory...
asked by 20.01.2015 / 19:29
1
answer

SUM and MAX function in Hibernate

Hello I have the following scenario, I have a hibernate criter where I get the highest value from a column when I pass a branch code as a parameter. Example: There are only two branches if the code is 1 is a value, if 2 is another value that...
asked by 15.07.2015 / 02:46
2
answers

How to Inhibit display of information in the eclipse console using hibernate

I would like some help. I'm developing a system using jpa-hibernate, jsf and primefaces. Whenever I run the application the following appears on the console: 0 [http-8080-2] INFO org.hibernate.cfg.annotations.Version - Hibernate Annotations 3...
asked by 10.07.2014 / 16:24