Questions tagged as 'jpa'

2
answers

What is the relationship between JPA and ORM?

I wanted to know the relationship between JPA and ORM because I was in doubt, if both, deal with the same subject.     
asked by 30.11.2015 / 22:07
1
answer

java.lang.IllegalArgumentException error in Hibernate when working with enum

Take a look at the error message: jun 02, 2015 5:23:57 PM com.sun.faces.lifecycle.ApplyRequestValuesPhase execute ADVERTÊNCIA: /WEB-INF/template/pedidos/CapaPedido.xhtml @29,99 completeMethod="#{cadastroPedidoBean.completarCliente}": java.lang...
asked by 02.06.2015 / 22:28
1
answer

Duplicate records with OneToMany relationship

I have a mapping as follows: public class ClasseA { public ClasseA(){ listaClasseB = new ArrayList<ClasseB>; } @OneToMany(mappedBy = "xxxx", fetch = FetchType.LAZY, cascade = CascadeType.ALL, orphanRemoval = true)...
asked by 27.11.2014 / 13:11
2
answers

Mapping JPA ListMap ..

I have the following problem and would like some opinion to know the best approach: Let's suppose that you have a system that manages a school and would like to have the option for the administrator of the system in which it can register a mo...
asked by 06.02.2015 / 19:26
2
answers

EntityManager or Session? Which one to use?

I have worked with projects that used both Session and EntityManager but it has never been clear which one to choose. What to base myself on and what they differ in terms of performance and compatibility. Can anyone give a tip?     
asked by 29.12.2016 / 14:17
2
answers

What are the ways to avoid infinite recursion without using the JsonIgnore annotation in SpringBoot

I have a @OneToMany relationship between Produto and TipoProduto where TipoProduto can have multiple Produto s and a Produto can only have TipoProduto . I would like to list all Produto s...
asked by 30.10.2017 / 00:33
1
answer

Custom auto increment

I have to generate an auto increment of type "000"+id , but I can not get to something concrete, my base is this below, I just wanted a light how to do it, I do not need the answer itself. > @Id @GeneratedValue...
asked by 15.10.2014 / 19:09
1
answer

JPA, Hibernate, Spring MVC, Maven - Definition

I have many doubts in definitions! My goal is to build an architecture of a system, but the definitions of JPA, HIBERNATE, SPRING MVC, MAVEN, are obscure. JPA: Nothing is more than a specification (ok) Hibernate: Persistence Provider,...
asked by 24.06.2016 / 01:57
2
answers

Multiple persistence units with Spring Data

Is it possible to create multiple persistences units by connecting to different databases in the same JPA application using Spring Data? For example. I have an application that will run on MySQL normally. However, it will have to query in an O...
asked by 15.01.2015 / 13:24
1
answer

Using Hibernate to generate tables with h2

I'm developing an application in which I decided to use h2 as the embedded database. This is the first time I'm using this type of database and I'm having trouble generating the tables through hibernate. My hibernate.cfg.xml : <hibernat...
asked by 03.05.2014 / 23:02