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
answer82
viewsHow to prevent Hibernate from creating columns from the fields of an abstract mother class
I have an abstract class Pessoas with methods getters and setters and a concrete class that inherits from Pessoas (members). By mapping the concrete class as Entity and its fields, it is creating…
-
0
votes0
answers54
viewsID by variable it returns null and if you put the ID "in hand" it returns the right object
I am trying to recover a code received by a request to recover objects from the database, but am encountering some problems. Performing tests, replace the id coming from the request, by a forced…
-
0
votes1
answer57
viewsTrunc Hibernate
I have the following query that I need to search in the database for schedules according to the dates reported (initial date and final date). Let’s say I made an appointment for the 20th/10th/19th.…
-
0
votes2
answers332
viewsUser change does not work, is doubling given in bank
I implemented spring security in my project, I can already register new users and login/logout. Now I’m trying to edit this user’s data, when I click save, it duplicates the data in the database,…
-
0
votes1
answer68
viewsHibernate Query using Like and Where
Beauty guys ? So I’m doing a query with Hibernate, which is the following: Query query = session.createQuery("SELECT c FROM Cliente c WHERE c.filial =:filial AND c.ativo =:ativo AND c.tipoCliente…
-
0
votes0
answers87
viewsReturn all records from another class in JPA Spring
How do I return a complete list of another class within a class? I need Patient.java to return (in the findALL that returns me in JSON) a list of all records in the Statuspaciente.java class,…
-
0
votes1
answer38
viewsSelect 1:n and n:1 using JPQL
Good night, I am trying to select between 1:n and n:1 tables using jpql table categoira @NotNull @Column(nullable = false) @OneToMany(mappedBy = "categoria") private List<ProdutoCategoria>…
-
0
votes1
answer86
views -
0
votes1
answer207
viewsInfinite recursion in a bidirectional Manytomany model in Hibernate
I’m trying to create a bi-directional Manytomany relationship in Java, I can already insert into the database smoothly, but when I try to bring data from these tables I fall into an infinite…
-
0
votes1
answer341
viewsInfinite looping in bidirectional relationship - Manytomany
I’m building a Rest API in Springboot. In it I have 2 related classes, and when I do a get in one of them they return me a looping Infinite through your foreign keys I’ve tried using the…
-
0
votes1
answer98
viewsHow do I set up a column to be composed in Mysql with Hibernate (Java)?
I’m doing a CRUD and in creating my model I’ve reached a point where I can’t get out. I have a table "Plan" and each plan can have several "Modalities", as well as several "Extras", but I do not…
-
0
votes1
answer186
viewsError @Postmapping @Manytoone settando "usuario_id" spring boot
I’m using Spring and Hibernate in one of the applications I’m working on and I have a problem with processing transactions. I need to do a POST using 2 entities, the Lancamentoentity and…
-
0
votes0
answers15
viewsjava.lang.Nullpointerexception error
Good, I’m trying to use Session = sessionFactory.openSession(); to fetch objects in the BD and give me the following error. Exception in thread "main" java.lang.Nullpointerexception at…
-
0
votes0
answers26
viewsSave time in format: HOUR:MINUTE using primefaces
I have a following problem, I want to save an entry time in which I type this time and I did this in xhtml: <p:datePicker maxlength="6" id="timeonly" showTime="true"…
-
0
votes1
answer92
viewsOracle Session date format for running Stored Data
Talk guys, all good? I have a little problem that may be simple to solve, but I could not find solution so far. I have procedures stored in the oracle database that need to be executed, however I am…
-
0
votes1
answer54
viewsMap data like Mysql TIME to JAVA above 24 hours Example (37:26:30)
I have a system that I need to bring Mysql database time information above 24 hours to Java. We use Ibernate and it’s like this; In the bank the data is as TIME (37:13:36) example: TEMPO_REPOUSO…
-
0
votes1
answer29
viewsError in Relationship NoHibernate
I have the following classes User: import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Set; import javax.persistence.CascadeType; import…
-
0
votes1
answer197
viewsJPA connection to Firebird error
I always used mysql for the database, but now I have a need to connect with a band Firebird(FDB) in a project, I am using Maven, when trying to connect spring returns me the following error: Caused…
-
0
votes1
answer230
viewsSpring Boot - initial test data
I am trying to pass data to test the front, but the controller is not getting the data that Spring Boot should start. My application.properties: spring.jpa.hibernate.ddl-auto=create My import.sql:…
-
0
votes0
answers110
viewsPersist child objects with parent id 1:N
Guys I’m having difficulty in relationships with Hibernate, I have a 1:N relationship between Provider and Address (1 provider may have N addresses). My problem is this, when I try to persist a…
-
0
votes1
answer199
viewsInsert data into related entity @Onetoone in Spring Boot(Jpa, Hibernate, Postgre)
I have a one-dimensional relationship (1:1) where the contract has a tenant. Class User @Table(name="TB_USER") @Inheritance(strategy = InheritanceType.JOINED) public class User implements…
-
0
votes0
answers37
viewsI need to Associate two entities in @Manytomany with JPA using Mysql, but it is not saved in the composite table (usuario_item)
I need to make the connection between user and item for a login system I’m stagnant in this error 2 days ago. I searched for forums and tutorials and could not get anything to help me. If possible…
-
0
votes0
answers20
viewsJava Criteriabuilder groupBy with Expression and Criteriabuilder.Function
I’m getting the bug: "ERROR: "movement0_.date1" column must appear in the GROUP BY clause or be used in an aggregate function". Estou usando o seguinte código para montagem da typedQuery:…
-
0
votes0
answers71
viewscom.mysql.jdbc.exceptions.jdbc4.Mysqlnontransientconnectionexception: No Operations allowed after Connection closed
On my hosting service, whenever the time_out server arrives in 8 hours, gives this error: com.mysql.jdbc.exceptions.jdbc4.Mysqlnontransientconnectionexception: No Operations allowed after Connection…
-
0
votes0
answers45
viewsError saving user - Hibernate
I am getting the following error while trying to save a user using Hibernate: java.lang.IllegalArgumentException: Can not set java.lang.String field com.example.apiadote.model.entity.Usuario.email…
-
0
votes0
answers40
viewsIn my Java web project the mysql driver does not work when using the dependency in the pom.xml file
All right, here’s the deal. I am doing a java web project and when I add mysql-Connector-java as dependency within the pom.xml folder, the project does not communicate with the database. However,…
-
0
votes0
answers180
viewsSpringboot, Hibernate does not create tables in the H2 database
Hello I’m trying to use bank H2 with springboot, but tables are not being created in the database automatically. application properties #DataSource spring.datasource.url=jdbc:h2:file:~/fintech…
-
0
votes0
answers22
viewsAuditoria Hibernate
I am trying to accomplish the construction of a history of a given table. @Entity @Table(name = "RUBRICA_INSTITUTO) @Getter @Setter @Audited @Audittable( "RUBRICA_INSTITUTO_AUDITORIA" )…
-
0
votes0
answers29
viewsJPA Hibernate does not work when I add the module-info.java
Hello, I am developing a simple CRUD study using Javafx such as GUI and JPA/Hibernate to do the work with the database. It’s a Maven project, I’ve added the required libraries and Javafx and…
-
0
votes0
answers22
viewsHow does the <class> tag work in the persistence.xml file in jpa?
Good night. I’m starting in jpa studies, and in a moment I came across the following situation, I filled in the persistence.xml file as follows: <?xml version="1.0" encoding="UTF-8"?>…
-
0
votes0
answers27
viewsNo corresponding editors or conversion strategy found
By clicking to search it gives the following error below, but when I take the formatting of the mask in Webconfig works normally. Someone can help? Failed to Convert value of type [java.lang.String]…
-
0
votes0
answers13
viewsHow to set a postgres function parameter using Native query?
Good afternoon! I created a Native query that uses a postgres function date_part(text, timestamp). My code: String sql = "SELECT " + "(SELECT coalesce(count(*), 0) FROM public.cliente) AS…
-
0
votes1
answer63
viewsIntermediate table mapping with JPA attributes
Hello, I’m trying to create a relationship where there is an intermediary table that has fields other than foreign keys. My classes are like this: @Entity public class Pedido { @Id…
-
0
votes1
answer47
viewsManytomany jpa - Spring Save Relationship Entity Data
Good night, you guys! I have 2 classes: Services and Order. Services contain name and value/time. Request contains attributes: valueBrut, valueLike, percentualTime , user and a list of services.…
-
0
votes0
answers28
viewsHow to Enter Into Spring Data in a Bi-Erect Relationship
I’m doing a back end study using the api SWAPI, I have already mapped the entities etc. But now I don’t know how to map to insert, for example: Entidade Film @Data @Entity public class Film extends…
-
0
votes1
answer75
viewsSave daughter entity against Manytoone Hibernate Jpa
I have 3 entities: Request, Request and Service; There is a many-to-many relationship between the Request and Service entities so I created the third table; I would like to save a Request and also…
-
-1
votes1
answer461
viewsEnvers hibernate problem with class objects within a class
I have the following class. @Entity @Audited @GenericGenerator(name = "Sequence_Generic", strategy = "com.paradigma.ecred.dao.hibernate.generator.ManualGenerator") // sequence generic criado para a…
-
-1
votes1
answer1135
viewsHow to register a photo using Uploadedfile from primefaces? I was able to save the photo inside the photo variable but I can’t save it in the database
Console message: set 02, 2015 11:05:01 AM com.sun.faces.config.ConfigureListener contextInitialized INFORMAÇÕES: Inicializando Mojarra 2.2.8 ( 20140814-1418…
-
-1
votes1
answer2773
viewsUnable to build Entity manager Factory errors Help aq please
Unable to build Entity manager Factory errors in application. JPA, Hibernate, Postgresql, MAVEN, Tom Cat and Eclipse. These errors have occurred below: nov 03, 2015 8:33:35 PM…
-
-1
votes1
answer308
viewsHow to "set" a Query in the @Entity annotation with Hibernate?
I have the following class: Java student. @Entity public class Aluno implements Serializable { @Id @Column(length=11, nullable=false) private int cpf; @Column(nullable=false) private String nome;…
-
-1
votes1
answer2120
viewsList the 10 Best Selling Products
I need to list the 10 best selling products from a table using Hibernate. The table item_sale has the following columns: amount id_product valor_unitario value_sub_Total…
-
-1
votes1
answer294
viewsError, I cannot save in bank using Hibernate
Good afternoon Pessoa, I need your help! I have a problem in my project, my Hibernate is working creating tables but when I tried to save it does not work and the following error appears in junit(…
-
-1
votes1
answer588
viewsJava system sending message to mobile
Speaking personally, I am developing a Java web application with Eclipse Maven, to use in a small office, cloud-run system and access by office computers. I was asked at the end of a launch, that a…
-
-1
votes1
answer73
viewsConnection to Hibernate, java.lang.Nullpointerexception error
Connection with Ibernate I have an application where I realized all the necessary settings to run the project following the company manual, I happen to have an error in opening the same related to…
-
-1
votes2
answers634
viewsError with @Autowired annotation
Good morning. I’m studying JPA + Hibernate + Spring MVC and I’m a few days with this problem and I can’t solve it. I looked on the Internet and the solutions I saw did not solve. Thank you. Stack…
-
-1
votes2
answers1469
viewsTarget Unreachable error, Identifier 'Clientebean' resolved to null
System with error: Error message: Caused by: javax.el.Propertynotfoundexception: /index.xhtml @22,72 value="#{Clientebean.cliente.name}": Target Unreachable, Identifier 'Clientebean' resolved to…
-
-1
votes1
answer372
viewsConfiguration EAR+Hibernate 5.2+Maven+JTA+Mysql project
Hi, I built a Maven j2ee-EAR project, but I’m having trouble setting up Hibernate/JPA. I added the dependencies in pom.xml, as below: <dependencies> <!--…
-
-1
votes1
answer862
viewsBuilding select in HQL
I’m starting to use JPA with Hibernate and I’m having doubts about the HQL query, I did some research on the Query hql but I couldn’t understand much. I want to do this select in hql only I did not…
-
-1
votes1
answer183
viewsSet column order in database using Springdata
I would like to know if it is possible (if it is, how to do) to define the order of the columns in the banco de dados using JPA. I noticed that it creates the column Id first, and then the columns…
-
-1
votes1
answer62
viewsHTTP Status 404 - Not Found - with Spring, Hibernate, Jpa, Mysql eTomcat
I made a change in my project passing the responsibility to Spring to control the transactions according to Caelum documentation and other examples I searched the web, already searched for…