Questions tagged as 'hibernate'

1
answer

"No Persistence provider for EntityManager" for Hibernate 5.x

Well, I have to update the version of hibernate that I was already trying to implement in my project to avoid bugs of the previous version, but I'm having a hard time persisting in the new version, since there were changes. > The first...
asked by 19.10.2017 / 15:39
1
answer

Hibernate is not creating or updating DB tables

I have classes beans.xml <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javae...
asked by 02.05.2018 / 21:30
1
answer

Foreign key recording as null

Foreign key is writing as null. I have done several searches I could not find a solution. You could help me find my mistake. This is an example that I researched on the internet, if I can get the foreign key in the bank popular, I can do with th...
asked by 13.10.2016 / 21:49
2
answers

OneToOne Mapping JPA 2.2 Unidirectional

Hello, everyone. I'm using JPA + hibernate 4 on top of the database structure (MySQL 5.6) below. I'm in doubt about the @OneToOne relationship. What's happening: Entity BodyPart has a @OneToOne relation with Body...
asked by 04.11.2016 / 14:52
1
answer

How to persist abstract class with JPA

I know JPA and I have other tables already implemented and working. I would like to know how to persist the classes below, since one is an abstract class and the other is "extending" it. Should I put annotations and properties as if...
asked by 08.04.2015 / 21:09
2
answers

Remove association in relation to Many to Many

I have a one-way @manytomany fault relationship and I need to remove this association according to some criteria but I did not want to have to navigate all objects in the collection to remove one-by-one. I thought of JQPL " delete f...
asked by 27.11.2014 / 13:58
1
answer

Tomcat 8 + MySQL + Hibernate Name [jdbc / token_data] is not bound in this Context. Unable to find [jdbc]

I'm having serious problems with an application, trying to set it up, and nothing. As a beginner on the web part, I will first say what I understood: Tomcat needs settings (xml) to work with Hibernate. In the case of the TOMCAT folder y...
asked by 10.05.2016 / 02:33
1
answer

How to test the service layer

I'm developing a multi-layered and multi-module web design. For the persistence layer I am using JPA 2.1 and hibernate 4.2 and for the JUnit 4 tests. In this architecture my project was divided into classes: GenericDAO (interface); Generic...
asked by 19.01.2015 / 01:21
1
answer

Create Dto by the constructor with a List parameter of a Hibernate entity

I have a @Query Spring, which performs a query to the bank by an Entity, to create some DTO Objects. And the properties of this DTO object, I passed via Builder, but I needed to pass as a parameter on the List constructor it has in the Ent...
asked by 14.11.2014 / 20:52
1
answer

Creating automatic tables by Hibernate

Good afternoon, I'm trying to create the tables automatically, being that I think I should be missing something. Can anyone help me? this is my line of code Cargo.java package br.com.teste; import java.io.Serializable; import j...
asked by 11.08.2014 / 21:28