Questions tagged as 'hibernate'

0
answers

How to create shopping cart in JSF with Hibernate Postgres Glassfich and primefaces? [closed]

I need to create a shopping cart like in e-comerce but everything in the same page, and I do not even know where to start, I'm new to programming, In my project I use Primefaces , Postgressql , Hibernate , the project is JSF and has the...
asked by 04.09.2015 / 21:01
0
answers

Behavior Soft Delete Hibernate Spring Boot

I would like to know if there is a soft delete functionality in Hibernate, since today I'm doing something that I consider to be a gambiarra, something like: @Entity @Where(clause="ativo=1") Controller: Rejeicao rej = rejeicaoRepository.f...
asked by 10.06.2015 / 16:48
0
answers

Dependency Injection Doubt on hibernate event listener

I wonder if there is any way I can inject features into a Hibernate Event Listener using vraptor 3.5. I wanted to be able to simulate the behavior of a trigger that we have in the database. And this Listener would do an update on the bank. I...
asked by 10.06.2015 / 16:00
0
answers

Error while displaying a collection of phones and emails from a contact

I want to display a list of contacts with phones and emails on an XHTML (JSF + PrimeFaces) page. I can display everything I want in a test class: package com.fercosmig.testes; import java.util.List; import javax.persistence.EntityManager;...
asked by 12.08.2015 / 23:26
0
answers

Problem with aggregate function, using CreateQuery from Hibernate

In a Packaging, a fk Packaging refers to the 'parent', the larger packaging. EX: let's say that inside a package B fit 10 packages A. A packing record A will have in your package the packing B in which it will be inserted. There is a query...
asked by 30.07.2015 / 21:42
0
answers

Error "java.sql.SQLException: Incorrect string value: \ xE7 \ xF5 for column"

Good afternoon, I'm having the error below whenever I try to perform an indexing method. ERROR: javax.servlet.ServletException: net.alforria.util.InfraException: net.sf.hibernate.exception.GenericJDBCException: Could not execute JDBC b...
asked by 02.06.2015 / 19:15
1
answer

Save entity and all its child entities

I'm having problems with the updates of my MDFe entity, before explaining what happens, I would like you to look at the image below, from it I can explain better. We can verify that MDFe has a one-to-many relationship with MDF and Documen...
asked by 29.04.2015 / 13:58
0
answers

(Hibernate2) How to use createSQLQuery returning unmapped values

Good afternoon, Using HQL, I'm having trouble getting the client price table name . So I decided to try to use Native SQL via Hibernate. But I'm not able to do it in Hibernate 2 ... Next, I'll spend my classes involved and my function whe...
asked by 23.02.2015 / 12:30
0
answers

Change method to insert image - JSF

How do I change the method to be able to insert the image? public Produto gravarImagem(Produto produto) { Session sessao = HibernateUtil.getSessionFactory().openSession(); Produto produtos = null; try { Query inseri_ima...
asked by 20.05.2015 / 19:42
0
answers

DAO Method Can not Save Image

My bean class is already able to save the image in my specific directory, I know this because I did a test, but only it fails to save the String which is the name of the file that makes FileUpload in the database I'm going to show part of the...
asked by 19.05.2015 / 20:51