Most voted "hibernate" questions
Hibernate is a framework for object-relational mapping written in the Java language, but is also available in . Net as the name Nhibernate.
Learn more…934 questions
Sort by count of
-
0
votes1
answer630
viewsHibernate self relationship transforming into json breaks
I am using Hibernate to persist the objects in an embedded HSQLDB file. I have created a method similar to a "Tester" to popular and seek the persistent information. But when I search for the…
-
0
votes2
answers994
viewsSubquery in Java HQL
Hello, I am in a project that uses geolocation and I am doing a feature to list the stores closer to the location chosen by the user. I am using the Postgresql database and I made this query to…
-
0
votes0
answers67
viewsJava Hibernate helps
Persistence.xml <?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/2001/XMLSchema-instance"…
-
0
votes1
answer307
viewsProblem with Firebird Hibernate bank connection
I have an application in java that provides Rest services with Servlets and Hibernate, which at first works perfectly. I can make thousands of requests to various services that recover information…
-
0
votes0
answers73
viewsHibernate does not save oneToMany
I have a 1 -> n relationship between Connection and Reporting. The classes are as follows:: @Entity @Table(name = "conexao") public class Conexao { @Id @GeneratedValue(strategy =…
-
0
votes0
answers2305
viewsHibernate.properties not found
Geratable class with the main method package br.com.drogaria.main; import br.com.drogaria.util.HibernateUtil; public class GeraTabela { public static void main(String[] args) {…
hibernateasked 7 years, 3 months ago Salmir Ferreira de Araujo 11 -
0
votes0
answers560
viewsJPA with "Detached Entity passed to persist:"
Hello, I have a problem because I use an intermediate table to save the Ids of other 2 tables. Except that the way that Mapeei, I can’t save in this table because apparently JPA understands that I…
-
0
votes3
answers814
viewsI cannot display Spring error message
I’m trying to validate some annotated fields, but I can’t bring the messages to the jsp page: Java user. mport java.util.Calendar; import javax.validation.constraints.Email; import…
-
0
votes2
answers154
viewsInheritance persistence, one-to-one relationship and manual primary key
I’m developing a heritage web project to finish my degree. I am using Java (IDE: Spring Tool Suite), Spring, Hibernate and Mysql. I’m having a data modeling problem that I’m having trouble solving:…
-
0
votes1
answer3056
viewsName [name] is not bound in this Context. Unable to find [jdbc]
In the expectation of improving the performance of BD access I started to implement a pool of connections within my Web Application. But every time I will give a lookup on the application I think…
-
0
votes1
answer693
viewsDatabase Test with Spring Boot
I’m having an error, when running my application with profile test, Spring Boot does not create the same database in the local profile. Any suggestions? Follow my application-local file.properties:…
-
0
votes0
answers177
viewsSelect only a few columns from Hibernate-mapped objects
How can I select only a few fields of a related object ? How it works (taking everything): List<Participante> participantes = this.entityManager.createQuery("SELECT a " + " FROM Participante a…
-
0
votes2
answers200
viewsSpatial + Postgis + Geotools Hibernate - Persistence Failure
I have a problem to persist a geometric data in the database (Postgres) I gave a read on the forums and documentation and found nothing about it, someone can give me a help? Libs: pom.xml with…
-
0
votes0
answers154
viewsManytomany include other fields
Hello, I have a relationship ManyToManyamid envio and carro, and would like to understand how do I save in the same table, which is created through this relationship, the entity id Local. Entidade…
-
0
votes0
answers182
viewsHow to improve ajax update ? JSF performance
I am developing a system for restaurant and I have a datagrid that updates the other. For example: I click on the class and update the product datagrid. It works, but the result is slow. I’m wearing…
-
0
votes2
answers383
viewsWhy can’t I erase an object with Hibernate?
I have on a screen a process table and want to delete one of them. This is a piece of mine datatable: <p:column headerText="Excluir" style="width:68px"> <p:commandButton…
-
0
votes2
answers214
views -
0
votes1
answer324
viewsHibernate Duplicating Records
I am new to the use of the Hibernate Framework and so I’m having trouble solving a question. I’m using a relationship between objects as follows: @Entity @Table(name = "PEDIDO") public class Pedido…
-
0
votes1
answer63
viewsProblem in table name during creation by Hibernate
I am "announcing" an entity Menu using Hibernate/jpa, and Menu contains an entity ShareActivity embeddeble that I created. @Entity(name="menu") public class Menu implements Component { @Embedded…
-
0
votes1
answer174
viewsFactory error when using @Embeddable in JPA
I need to create a composite key on my system, after researching a little discover that I should implement @Embeddable, even fine, I added the class on my system implementing the keys, but when I…
-
0
votes1
answer907
viewsError with Unexpected JPQL token
I made a select JPQL but I’m having this error: Caused by: org.hibernate.hql.internal.ast.QuerySyntaxException: unexpected token: where near line 1, column 151 [select pes, pEnd from…
-
0
votes1
answer111
viewsError in persistence.xml when connecting oracle database
I have this file to perform oracle database persistence. However do not connect! <?xml version="1.0" encoding="UTF-8"?> <persistence xmlns="http://java.sun.com/xml/ns/persistence"…
-
0
votes1
answer236
viewsJava @Generatedvalue + SQL server NEWID + Hibernate
I have a table that has ID defined as CREATE DEFAULT ID_Tabelas AS NEWID(), that is, even if I use an Insert without the key, it will be generated automatically. How to make Hibernate recognize that…
-
0
votes1
answer92
viewsManytomany Hibernate - study
I am studying the operation of Ibernate and I have some doubts.... Folks anyone can tell me how Hibernate works on the issue of organizing this information Manytomany? on this example site:…
-
0
votes1
answer305
viewsSession Hibernate errors - getCurrentSession()
Please, I would like your opinion on that code if possible. If this coherent or needs to be improved because I constantly have errors org.hibernate.TransactionException: rollback failed or…
-
0
votes1
answer69
viewsFirebird JPA returning null values
When I try to get some record from the bank, some fields come null, although in the table they are not null! Any idea what might be causing this behavior? I’m using Java 8, Hibernate 5.2.4, Jaybird…
-
0
votes1
answer47
viewsUser-Managed Transaction and Flush problem using JTA and Arquillian
I’m doing some tests with Junit and, to inject dependencies in it with CDI, I adopted Arquillian. But there’s one problem I haven’t figured out how to solve without using the method flush() of…
-
0
votes1
answer105
viewsError starting Tomcat server
I am inserting two Hibernate dependencies into my pom.xml <!-- https://mvnrepository.com/artifact/org.hibernate/hibernate-core --> <dependency>…
-
0
votes1
answer210
viewsError with Hibernate query
I am trying to perform the following Query on Hibernate: return this.entityManager .createQuery("SELECT u FROM UploadArquivoCondominio u WHERE " + " u.condominio = :ucondominio ) " + "AND u.dtinicio…
-
0
votes0
answers193
viewsHow to Optimize Java Connection with Postgres
My connection class with the database is taking too long to open the connection, it takes almost 20 seconds. Hibernate Usage and the Bank is Postgres running localhost. Am I doing something wrong?…
-
0
votes0
answers250
viewsHibernate does not create table in the database
The event model is an entity that should be created in the bank, but Hibernate is not creating. persistence.xml <persistence xmlns="http://java.sun.com/xml/ns/persistence"…
-
0
votes1
answer64
viewsWrong time recording
I own these 3 classes as a model. Object: import java.io.Serializable; import java.util.List; import javax.persistence.CascadeType; import javax.persistence.Column; import javax.persistence.Entity;…
-
0
votes1
answer105
viewsConnection error while using Hibernate Logs
I am trying to see the Hibernate generated sqls in my JAVA application but I am having problems because when adding the two commands below are launched some exceptions. Commands I am inserting into…
-
0
votes1
answer90
viewsTraverse lines from a javaEE, jsf2, and Primefaces datatable with Keyboard arrows?
I found this code on the Internet, but part of it was discontinued xhtml: <p:hotkey bind="down" update=":testform:tabletest" action="#{aBean.moveDown()}" /> aBean: public void moveDown() {…
-
0
votes1
answer136
views"The Java Exception has ocurred" error while running the Postgre JDBC driver
Follow my problem: 1 - I am using the Postgre 9.6 database. 2 - I downloaded and opened in ECLIPSE a project with example Java application with the use of Hibernate and Postgre that the teacher…
-
0
votes0
answers223
viewsjava.lang.Illegalargumentexception: org.hibernate.hql.internal.Ast.Querysyntaxexception: Unexpected AST Node: query
I’m having to make a SELECT in JPA that contains an ORDER BY by selecting from another table. Small representation of tables: When I did by SQL it was normal, but when turning into JPA, it did not…
-
0
votes1
answer382
viewsError : "No Persistence Provider for Entitymanager"
I have a project in Eclipse with an application that persists in the Postgresql 9.6 database through Hibernate, but Java is not recognizing the "persistence-Unit name" which is set in the…
-
0
votes1
answer338
viewsManytomany JPA - Product Category
Hello, I’m having difficulties in the process of deleting a record that has relationship @ManyToMany. When I delete the record referring to the Product entity with the annotation CascadeType.ALL, it…
-
0
votes2
answers318
views -
0
votes1
answer56
viewsremoval of related JPA and Hibernate data
I have two classes, Fornecedor and Produto and when I register the Produto and choose a Fornecedor normal sage, but at the time of removing a Produto or Fornecedor related to a Produto nothing…
-
0
votes1
answer162
viewsInsert foreign key Hibernate
I have four entities (selection, match, bet and bettor) where within the Bet class I have the Ids of a bet and a bettor. When I try to insert a bet by clicking on the match and the player, it…
-
0
votes1
answer95
viewsJPA Error when inserting a product object that has reference to an existing object
I am doubtful in the note manytomany ,I know that it serves to indicate to white that he needs to create an intermediate table and that in turn is located on top of an element that will be list…
-
0
votes1
answer208
viewsJPA+HIBERNATE error
Sirs. I have a class called User. @Entity @Table(name = "tb_usuario") public class Usuario { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private int id; @Column(name = "email", nullable…
-
0
votes1
answer134
views@joincolunm with foreignKey Hibernate
Hello I wanted to make a foreign key, but I don’t understand the syntax. In the Endereco class: @Embeddable @Table(name = "tab_endereco") public class Endereco { @Column(length = 40, nullable =…
-
0
votes1
answer126
viewsOnetomany or Manytoone?
Good evening, I have some basic beginner questions I need to create a timeline that has the following: What events occurred in a certain range of dates, who was born and who died in this range? I…
-
0
votes2
answers292
viewsHow to use @Mappedsuperclass @Id with @Sequence Individual - Hibernate oracle
I need to solve a question of using inheritance and sequences with Hibernate and Oracle. I’m using Maven with: hibernate-core 5.1.5.Final hibernate-entitymanager 5.1.5.Final hibernate-validator…
-
0
votes0
answers44
viewsSave to JSF+JPA & Hibernate database error
Good afternoon I am making a registration with JSF , and when I try to save the user in the bank happens this error , however I already added all jars in the folder lib Tomcat , and it has been…
-
0
votes2
answers1412
viewsMigration of Hibernate 4.3.x to 5.3.1
I’m taking a course in Sales System, the teacher uses the version 4.3.11 of Hibernate(what works perfectly). But I would like to migrar for the current version(5.3.1), but with the configuration of…
-
0
votes1
answer699
viewsUpdate JSF only works in the whole form (Primefaces)
good night. I’m racking my brain with a problem that seemed simple I have a form with some fields, when selecting a combobox I want to hide and display some fields. I am using p:ajax to perform the…
-
0
votes1
answer325
viewsHow to resolve this Error: Unknown Entity when saving to Hibernate?
Follow the code Itensvendadao: package com.livro.capitulo3.crudannotations; import java.util.List; import javax.persistence.EntityManager; import javax.persistence.PersistenceContext; import…