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
answer59
views -
0
votes1
answer60
viewsError while listing database data - JPA2 and Hibernate / JSF
Console error in eclipse mar 27, 2018 2:05:24 PM com.sun.faces.application.view.FaceletViewHandlingStrategy handleRenderException GRAVE: Error Rendering View[/Fornecedor.xhtml] javax.el.ELException:…
-
0
votes1
answer105
viewsHibernate + JPA 5 - Java Web
I’m in need of some help in the following problem. When running my web java project on Glassfish Hibernate on every run try to recreate my tables. Minha Entity. @Entity @Table(name = "Estados")…
-
0
votes2
answers919
viewsJSON Infiito when using GET @Manytomany
I have two classes, of which you have a @Manytomany relationship generating the third table described in the code below: Card package br.com.rpgnext.deck.critical.model; import…
-
0
votes1
answer375
viewsHibernate brings the incomplete object (without foreign keys)
I have a jsf+Primefaces+Hibernate application, when I go to make a query in the database Hibernate returns incomplete objects. This happens for all classes but I will use the questions class as an…
-
0
votes0
answers23
viewsJSF 2.3 project with delay in initial connection
I am making a system using Java1.8, JSF 2.3, Hibernate 5.4.x and Tomcat 9, with standard MVC and entitymanager. The problem is that to save the first object in a form, it takes about 3 to 5 seconds.…
-
0
votes1
answer108
views -
0
votes0
answers668
viewsorg.hibernate.Exception.Jdbcconnectionexception: Could not open Connection
I am having trouble losing connection to Mysql database, which occurs after few minutes of use. Please, can someone help me? I have no idea what it could be. Follows my codes: Hibernate.cfg.xml…
-
0
votes0
answers327
viewsValidate user login
I’m not able to validate the user login. Could someone give me a help? My Dao: public Login getvalidarLogin(Login login ){ Session session = HibernateUtil.getSessionFactory().getCurrentSession();…
-
0
votes1
answer201
viewsSQL/ JPQL query
Friends, good afternoon. I have a table in the database called Question Inside the table I have two columns that are code (id) and question. I have a filter that I can not specifically bring only…
-
0
votes0
answers56
viewsgetNamedQuery back null
I have a namedQuery that for some reason, is returning null results from the database. The namedQuery itself: @NamedQuery(name="Usuario.userLogin", query = "SELECT u.email, u.senha FROM Usuario u…
-
0
votes0
answers351
viewsJPA hibernate - delete children from the list
public class A implements Serializable { @OneToMany(cascade = CascadeType.ALL, orphanRemoval = true, fetch = FetchType.LAZY) @JoinColumn(name = "A_ID") private List<B> bList; } public class B…
-
0
votes0
answers53
viewsHow to block 2 users on the same screen - JAVA
I need to block the access of 2 people on the same screen, example, two people try to access the registration of a particular product, the second person who tries to enter should receive a warning…
-
0
votes1
answer422
viewsHow to implement the pessimistic lock in Java WEB EJB?
I have competition problems in my system, I need to insert the lock pessimistic because users access and save at the same time, causing bizarre errors in the result.
-
0
votes0
answers590
viewsAuthentication and authorization of the email and password on the login screen
I have a login screen in which the email and password are already registered in the bank, however I am not able to login with this data that are already recorded in the bank. In the loginBean class…
-
0
votes1
answer132
viewsSelectoneradio sending only one value
I am concluding a simulation system for my course completion work. However, I have a problem that I have not yet been able to solve. I perform a filter to select the questions for the user to…
-
0
votes1
answer65
viewsCode does not update in Hibernate JPA in Eclipse
Hello guys I’m making a system to sharpen a little my techniques and I came across a problem. I modified my code a little while ago but when I went to debug it looked like it was running the old…
-
0
votes2
answers92
viewsQuery with Hibernate error could not get a field value by Reflection
I have two entities: Profession and Specialty. When I select the profession, I would like it to return to me all the specialties that that particular profession possesses. When I send the search, it…
hibernateasked 6 years, 2 months ago Erick Ferreira 7 -
0
votes1
answer47
viewsInsert record into a table and use newly generated ID to insert record into related table
I have a insert where I save a record, and need to use the result of the saved value in another insert. Empresa emp = new Empresa(); emp.setId(1); emp.setNome("Nome da empresa");…
-
0
votes0
answers162
viewsError while doing Hibernate relationship with Java
Good afternoon guys! I have a question in Hibernate. I have the following case Person - Client - Supplier But I’m having trouble making the relationship. follows my codes New Error 18:50:34,405…
-
0
votes1
answer38
viewsUse Hibernate to save two equal classes
Good afternoon, I’d like to relate the class Partida with class Time, where departure would receive the PK(Id) of the home team and the visiting team. I am doubtful how to relate in both classes,…
-
0
votes0
answers98
viewsCould not determine type for: java.util.List, at table: ..., for Columns: [org.hibernate.Mapping.Column(...)]
I have a very simple problem using JSF + JPA c/ Hibernate. I have two classes: Message and Comment.. The Message class contains a list of Comments. But when trying to make this relationship the…
-
0
votes0
answers169
viewsHibernate.engine.jdbc.spi.Sqlexceptionhelper log Exception, SQL state null
1I’m having this problem in my Hibernate Validity to Newly established conection, when doing the query, it loses the session, only after giving several F5 the session back.. can anyone help me? ...…
-
0
votes1
answer110
viewsLimit @Onetomany List
Good morning Guys! I have some problems in a list that in some cases do not need to return it completely @OneToMany(mappedBy="local", cascade=CascadeType.ALL, fetch = FetchType.EAGER)…
-
0
votes1
answer78
viewsWhat to call Named Query in main? JPA
Guys, please, could someone show me how to call in the main @Namedquery class of another class. Follow the example: @Entity @Table(name="edificio")…
-
0
votes1
answer39
viewsError in the findById of a generic class for persistence and queries using Hibernate JPA
I have a generic class I’m using to perform queries with JPA Hibernate. My class is like this: public class BaseRepositoryImpl<T> implements BaseRepository<T> The problem is that in some…
-
0
votes1
answer248
viewsError saving form with Hibernate: could not execute statement
I have a web form that saves data in Mysql, but is returning an error could not execute statement; Column 'bairro' cannot be null. The error says that the 'neighborhood' field cannot be null, but I…
-
0
votes1
answer119
viewsHibernate does not find Hibernate.cfg.xml
. When indicating the configuration file to Hibernate, I tried the wrong relative path before ". cgf) (.. /.. /main/Resources/Hibernate.cgf.xml). But now corrected, the absolute and Hibernate path…
-
0
votes2
answers143
viewsSpring Bean tenantEntityManager error: Unable to find column with Logical name
am having an error while trying to run my JSF application with Spring, more specifically: -I have a method to do a badge search on certain repositories and change them after running method on a…
-
0
votes0
answers44
viewsError: Datamodel must implement org.primefaces.model.Selectabledatamodel when Selection is enabled
I am implementing a selection list (Datatable) but I only get this error: Datamodel must implement org.primefaces.model.Selectabledatamodel when Selection is enabled. Follow the code below:…
-
0
votes1
answer77
viewsHow to subselect/subquery using Criteria
Can someone help me find the problem of this consultation : CriteriaBuilder builder = em.getCriteriaBuilder(); CriteriaQuery<Solicitacao> query = builder.createQuery(Solicitacao.class);…
-
0
votes3
answers97
viewsI cannot save my Selectmanycheckbox Primefaces in the database
My View Cad Medico xhtml <p:selectCheckboxMenu id="multiple" value="#{medicoBeanView.objetoSelecionado.especialidades}" label="Especialidades" multiple="true" filter="true"…
-
0
votes1
answer232
viewsHibernate + Criteria: could not resolve Property
I’m trying to search my bank when making the User registration. Next, in my user registration have two Spinner(Company, Person) I would like to popular the person Spinner with only the people…
-
0
votes1
answer371
viewsTable relationship - Spring Boot Hibernate: Error accessing field [private int
Good morning everyone! I am having problems in the relationship of entities in the api, the bank was created correctly by Spring as can be seen below: Relationship Manytomany in trip table: @Id…
-
0
votes0
answers42
viewsError using MD5 in @Query in Springboot application
Good morning, initially I was trying to execute a query that would return a checksum: @Query(value = "SELECT MD5(STRING_AGG(atendimento::text, '')) FROM atendimento WHERE id_avaliador_fk = ?1;",…
-
0
votes1
answer53
viewsWhen modifying a data before sending to Query it updates the table
I’m doing a query select with spring + Hibernate, Query query = em.createNativeQuery(sqlBase); I am passing to the 'sqlBase' a Company as parameter, SELECT e.* FROM Empresa e WHERE e.id = :empresa…
-
0
votes1
answer76
viewsError: 'Operand type Clash: image is incompatible with Numeric'
When trying to save an object in the database, gives the following exception: org.hibernate.Exception.Dataexception: could not update. [...] Caused by: java.sql.Sqlexception: Operand type Clash:…
-
0
votes1
answer546
viewsList two related tables Primefaces x Hibernate
I need to list information from the two tables on the same grid, they have relationship created by Ibernate itself. You would need the vendor name in the table shown below In case it would be these…
-
0
votes1
answer416
viewsSpring Data JPA: How to Project Data?
I’m following a tutorial to make projection based at this link. However, it seems that the application is generating an error in the serialization of the data emitted by the reflection of Jackson.…
-
0
votes1
answer34
viewsNamed query not known - Hibernate + JSF
Personal talk, I’m having trouble calling a named query, resulting in org.hibernate.MappingException: Named query not known Hibernate.cfg.xml: <hibernate-configuration> <session-factory>…
-
0
votes0
answers80
viewsProblems to the popular Tableview
Good morning! When I run the code my Tableview pulls 2 blank lines. I am not able to show the inforamations in table view. Follow code below: Controller: package br.com.unitymanager.controller;…
-
0
votes0
answers75
viewsHow to work with Classes that have other Classes as a Springboot attribute
Eae people , this is the first time I’m programming for the web and using spring boot for it , is a college project where Frontend will be done in JS with React and Back made in JAVA with Spring .…
-
0
votes1
answer51
viewsSpring with Database (Sqlserver) already created
I’m developing an application Rest API using Spring Boot. Doubt: If I already have a Database in production with populated tables it is necessary to create the Entity class with the annotation…
-
0
votes0
answers16
viewsError with the orphanRemoval
I’m trying to use orphanRemoval for the TCC project and I’m having trouble, I think it’s dependency. @ManyToMany(cascade = CascadeType.ALL, orphanRemoval = true) private List<ReadingTarget>…
-
0
votes1
answer65
viewsUpdate Variable - SQL Database - Hibernate
here are excerpts from my attempt to create a real estate registration software and users. The project was developed in the MVC structure. (Model, Visualization and Control. Problem: How to update…
-
0
votes2
answers58
viewsProblem with persistence with spring
The mistake: java.lang.Illegalargumentexception: Not an Entity: class br.com.api.entities.Characters My Class package br.com.api.entities; import java.time.LocalDateTime; import…
-
0
votes0
answers22
viewsHibernate Criteria: Sort list by highest date of a child object
How do I create a Criteria to list an object ordering by the longest date of a child object. In this scenario: Domain: class Entity { List<Children> childrens; } class Children { Date date }…
-
0
votes0
answers7
viewsHow to make @Query queries in Manytoone relationships
People would like to know one thing. I am doing a project with jpa/Hibernate and in the mapping of my classes they are all @Manytoone. I have to make an sql query with two Join in series. When I do…
-
0
votes1
answer40
viewsError creating table Hibernate add ('type=Myisam') mysql
Hello, I am studying about Java web using Spring boot and Hibernate. but during an event project Hibernate is dropping an exception when running the server. if you need more information just ask.…
-
0
votes0
answers12
viewsjava.lang.Classnotfoundexception: javax.persistence.Persistence
I am in error when using Entitymanagerfactory, is a web project with Hibernate + JPA This is the mistake: java.lang.Classnotfoundexception: javax.persistence.Persistence at…