Questions tagged as 'hibernate'

2
answers

QuerySyntaxException: unexpected token:. near

This is the error I believe is easy for those who handle Java but as I am learning I still have not identified the problem. GRAVE: java.lang.IllegalArgumentException: org.hibernate.hql.internal.ast.QuerySyntaxException: unexpected token: . nea...
asked by 03.03.2015 / 17:41
1
answer

"Java exception has occurred" error while running PostgreSQL JDBC driver

Here's my problem: 1 - I'm using the Postgre 9.6 database. 2 - I downloaded and opened in ECLIPSE a project with Java application example with the use of Hibernate and Postgre that the teacher created (that is, the code is correct) I put t...
asked by 16.03.2018 / 02:28
1
answer

Error with query in Hibernate

I'm trying to accomplish the following Query in hibernate: return this.entityManager .createQuery("SELECT u FROM UploadArquivoCondominio u WHERE " + " u.condominio = :ucondominio ) "...
asked by 15.02.2018 / 20:49
1
answer

Query Entity without its Associations

I'm creating an application with JAVA SE + HIBERNATE . I'm having a "problem" in making a query to a single Entity. So I would like to query the entity ( TABELA ) without the relational mapping @One-to-One,@One-to-Many, @Ma...
asked by 05.09.2016 / 21:23
1
answer

@joincolunm with foreignKey hibernate

Hello, I wanted to make a foreign key, but I do not understand the syntax. In the Address class: @Embeddable @Table(name = "tab_endereco") public class Endereco { @Column(length = 40, nullable = false) private String logradouro; @Column(l...
asked by 26.05.2018 / 03:44
2
answers

Migration from Hibernate 4.3.x to 5.3.1

I'm doing a Sales System course, the teacher uses the 4.3.11 version of Hibernate (which works perfectly). But I would like migrar for the current version ( 5.3.1 ), but with the configuration of the last version, t...
asked by 03.06.2018 / 18:47
2
answers

Enum getting next code in Java

I have a class in java that one of its attributes is an enum and has the following values: HIPERTROFIA(1, "Hipertrofia"), DEFINICAO(2, "Definição"), RESISTENCIA(3, "Resistência"), OUTROS(4, "Outros"); When I send the value 0...
asked by 29.03.2018 / 15:59
2
answers

JSON Infinite when using @ManyToMany GET

I have two classes, which has a @ManyToMany relationship generating the third table described in the code below: Card package br.com.rpgnext.deck.critical.model; import com.fasterxml.jackson.annotation.*; import javax.persistence.*; imp...
asked by 10.04.2018 / 16:16
1
answer

JPA Error inserting a product object that has reference to an existing object

I'm having a doubt in the manytomany annotation, I know the same is meant to indicate to white that it needs to create a broker table and that in turn is located above an element that will be list public class Produto { @Id @GeneratedValue(str...
asked by 25.04.2018 / 12:38
2
answers

Hibernate is not mapping classes

Hibernate I'm using is not automatically generating tables My Persistence.xml file <?xml version="1.0" encoding="UTF-8"?> <persistence version="2.1" xmlns="http://xmlns.jcp.org/xml/ns/persistence" xmlns:xsi="http://www.w3.org/...
asked by 18.12.2017 / 18:22