Questions tagged as 'hibernate'

2
answers

Use foreign key as primary key - Hibernate

I'm implementing hibernate in my project and I've reached a stage when I'm having trouble mapping my entities. I have an entity called Book and would like to create an Inventory entity to store the number of books I have, however, I would lik...
asked by 05.03.2017 / 20:40
1
answer

Select hibernate criteria with unmapped entity

How do I make a select, using the criteria and bring an unmapped entity, would be multiple joins, and sometimes bring certain fields and others not.     
asked by 13.12.2016 / 20:06
1
answer

Primefaces does not find Panel and DataTable components

I'm doing a job where I use Primefaces + Ajax + Hibernate. I have a screen to add / change a client that should open in a modal every time the user clicks the button. And in that same code I have a dataTable to show all clients. However, for som...
asked by 12.11.2016 / 15:33
1
answer

JPA in java web

I'm having a project in JAVA WEB and I'm having problems with hibernate. The error is as follows: Informações: HCANN000001: Hibernate Commons Annotations {4.0.2.Final} Informações: HHH000412: Hibernate Core {4.2.2.Final} Informações: HHH...
asked by 22.10.2016 / 23:21
1
answer

Inheritance problem with HIBERNATE

Well, my problem is this: I have an abstract Employee class and two Attendant and Dentist subclasses that inherit from employee. I also have a User class, which has login attributes, ..., ...., ... and an employee linked to it. My...
asked by 27.11.2016 / 23:51
2
answers

How to solve the JPA Hibernate error

Can you help me with this error? Exception in thread "main" javax.persistence.PersistenceException: No Persistence provider for EntityManager named bsewebservicePU at javax.persistence.Persistence.createEntityManagerFactory(Persistence.jav...
asked by 22.08.2016 / 18:01
1
answer

Define ID manually with Hibernate in AUTO mode

Hello, I would like to know if there is a possibility to set the ID manually when using hibernate in auto increment mode. I want it to use the auto increment but in some specific situations I need to check the existing IDs in the database and...
asked by 22.07.2016 / 20:29
1
answer

Configuring SessionFactory Hibernate 5.2

Does anyone know of a tutorial or can you give me an example configuration for HibernateUtil.java class for hibernate version 5.2? I have already seen some settings, including in the documentation. But I still have doubts about being new to java...
asked by 24.08.2016 / 05:21
1
answer

Mapping the same entity class to two banks

Good afternoon Terrans, I'm a beginner in Java and I have the following situation. I have two databases, where I will transfer the records from one bank to another. Is it possible to have a Entity class mapped by the two banks? Comments:...
asked by 25.08.2016 / 23:01
1
answer

Delete created entity from a ManyToMany relation

I have a ManyToMany relation between users and profiles mapped with Hibernate : user: id name profile: id profile_name user_profile: user_id profile_id The mapping is done as follows: User:...
asked by 09.06.2016 / 18:22