Questions tagged as 'hibernate'

0
answers

Inserting records into the database only after you have finished inserting into a List

I do not know if I was very specific in the title, but I'll try to be more in the description. I have in my database a table of Disciplines that contains: id name hourly load I would like these disciplines to be added in a table (in p...
asked by 28.01.2015 / 01:56
0
answers

System 'hangs' after uploading image

In my system, I upload a certain image, the image is saved in a directory and then saved the product in the database until the right td, the problem is that after saving the product the system hangs, logging of the server does not show any error...
asked by 04.02.2015 / 01:55
0
answers

No Session found for current thread

I'm having trouble performing a test to add a profile user! My problem is in the addUser method. Test class code: public class AddUser { public static void main(String[] args) { ApplicationContext appContext = new Class...
asked by 01.12.2014 / 02:07
2
answers

Error java.lang.NoClassDefFoundError

I'm stuck on a project that should be a "bank" with a CRUD account and transaction. I have to use Oracle database because of the facul. This error happens when giving an insert in the database. Stacktrace: jun 11, 2017 4:21:58 PM com.sun.f...
asked by 11.06.2017 / 21:41
1
answer

How to display objects from a list? [duplicate]

I have the PessoaDAO class which has the following method: public List<Pessoa> BuscarTodos() { List<Pessoa> list = null; EntityManager em = getEM(); try { list = em.createQuery("select t from Pessoa t").ge...
asked by 07.10.2018 / 19:57
1
answer

List the 10 best selling products

I need to list the 10 best selling products in a table using Hibernate. The item_venda table has the following columns: quantity product_id community_value value_sub_Total
asked by 03.09.2016 / 16:36
1
answer

Error, Can not save to bank using hibernate

Good afternoon, Person, I need your help! I have a problem in my project, my hibernate is working on creating tables but when I did test to try to save it does not work and the following error appears in jUnit ( org.hibernate.MappingException: U...
asked by 10.09.2016 / 06:38
1
answer

Using a Criteria NOT with Hibernate

Currently, I have a search with Criteria that brings me results normally, but I want to add an implementation of type NOT to it. Does anyone have an idea how I could do this? I put in the code a comment with a possible idea of the i...
asked by 27.07.2018 / 23:49
1
answer

How to "set" a Query in the @Entity annotation with Hibernate?

I have the following Class: Student.java @Entity public class Aluno implements Serializable { @Id @Column(length=11, nullable=false) private int cpf; @Column(nullable=false) private String nome; @Column(nullable...
asked by 03.01.2015 / 17:30
1
answer

Condition IF, ELSE

I have a Java Spring MVC application, with Hibernate and JPA and HTML interface. I have two forms that depend on the class CadernosCadastrados and their attributes. Forms have the following names, cadastrodecadernos, change. In the firs...
asked by 14.11.2018 / 15:57