Questions tagged as 'jpa'

1
answer

Error in this loop of repetition. It is only getting the first value from the database

Error in this loopback. It is only getting the first value from the database. You are only doing the query in the first field and you are ignoring the others. @Controller // @RequestMapping("/login") public class LoginController extends HttpSe...
asked by 22.07.2016 / 04:42
1
answer

Problem with JPA using Wildfly 9 and JTA

It's the first time I try to use JTA using the Wildfly container and so far I have not been able to run my code right. When I publish the application (start Wildfly) it perfectly matches, generates the table and such. But when I enter the screen...
asked by 14.12.2015 / 15:55
1
answer

JPA annotation @Autowired

Is @Autowired the same as extends? Let's look at a small example: package com.dendetech.services; import com.dendetech.entity.Participante; import com.dendetech.repositories.PartnerRepository; import org.springframework.beans.factory.an...
asked by 08.09.2015 / 15:37
1
answer

SelectOneRadio sending only one value

I am completing a simulation system for my course completion work. However, I have a problem that I still can not solve. I do a filter to select the questions for the user to answer, and I play those questions that were found by the filter wi...
asked by 17.10.2015 / 16:26
1
answer

Does not write to the database and the console appears as recorded

I have a modal form to record the register, when I insert the data it gives as if it were saved in the Eclipse console, but the same does not happen in the database Message in the console as recording Ok. Hibernate: select empresa0_.id...
asked by 01.04.2015 / 04:55
1
answer

Error in EmbeddedId

I have the composite key below, the problem is that when creating schema and saving the values, Hibernate is inverting the values of TipoContrato with Distribuidora and vice versa. Has anyone had a similar anomaly using e...
asked by 30.09.2014 / 22:37
1
answer

Preventing entries from being deleted using Hibernate

Is there any way I can make sure that a particular table entry in the database is not excluded? For example, I created a usuários table in the database through the User class using the Hibernate and JPA anotations and would li...
asked by 24.09.2014 / 19:29
1
answer

Change of entity to reflect on related entities

I have two entities, for example: Obs: Code fiction to facilitate understanding of the problem. @Entity public class Celular{ @Id @GeneratedValue(strategy= GenerationType.IDENTITY) private int id; private String modelo;...
asked by 03.09.2014 / 23:15
1
answer

Daughter entity does not receive its id after merge of the parent entity via @CascadeType

I have a problem when I add an entity to the database via Cascade. After the update of entity Aluno the Daughter entity NivelAlunoLinguaEstrangeira does not work correctly. @Entity @Table(name = "ed44_aluno") @SequenceGenerator...
asked by 24.05.2014 / 20:51
1
answer

Limit @OneToMany List

Good morning everyone! I have some problems in a list that in some cases I do not need to return it completely @OneToMany(mappedBy="local", cascade=CascadeType.ALL, fetch = FetchType.EAGER) @OrderBy("dataContagem DESC") private List<Contage...
asked by 04.12.2018 / 12:46