Questions tagged as 'jpa'

1
answer

Problem with JPQL using JSF

I'm following a Java EE 7 book with JSF, PrimeFaces and CDI by Thiago Farias. In my persistence.xml, following the book, I have only the definition of my datasource, as follows: <?xml version="1.0" encoding="UTF-8"?> <persistence v...
asked by 13.09.2015 / 03:23
1
answer

Error inserting object into database

I'm trying to insert a record here and I can not. Hi, I have a table entity called Message , in which this entity receives an object of Categoria and Tipo , that is, when I register, I select which category I wan...
asked by 18.06.2015 / 03:17
1
answer

@DateTimeFormat with daylight saving time day with error

I'm having a problem converting date from 10/15/2017 (start of daylight savings time) My mapping looks like this: @Column(nullable = false) @NotNull @DateTimeFormat(pattern = "dd/MM/yyyy") private Date dataVisita; When processing the req...
asked by 17.10.2017 / 15:31
2
answers

JPA spring boot custom data does not work

public interface ProdutoRepositorio extends JpaRepository<Produto, Long> { @Query(value="SELECT new br.com.thiago.objcustom.SomaDosProdutos(e.nome, sum(preco)) FROM sitethiagodois.produto p inner join sitethiagodois.empresa e on e...
asked by 28.03.2017 / 04:56
2
answers

Return null for method type ListString

I have a method with return type List<String> , when doing a query I can return a value or nothing: public class Repositorio { @PersistenceContext private EntityManager em; public List<String> listaEscritor...
asked by 02.08.2018 / 21:19
1
answer

How do I clean a JTable?

I'm using JPA to populate my table which is located at Jframe . Through JPA, I make a selection in my bank to find all names that have part of the name I wrote, for example, if the entry is "m", all people with a name beginning with "m"...
asked by 20.06.2017 / 19:48
1
answer

Send email with java [closed]

Good afternoon. I'm using java, jpa, wildfly and primefaces. I need to send a notification email after the user clicks the send button. How do I send emails through java?     
asked by 05.09.2016 / 20:47
1
answer

Condition IF, ELSE

I have a Java Spring MVC application, with Hibernate and JPA and HTML interface. I have two forms that depend on the class CadernosCadastrados and their attributes. Forms have the following names, cadastrodecadernos, change. In the firs...
asked by 14.11.2018 / 15:57
1
answer

ManyToMany mapping with additional column

In my study project, aimed at controlling football matches, I have the following entities: Player Name; Startup Date of completion; Gols pro; Goals against; I still have to record the goals of the match per player, which sho...
asked by 02.03.2017 / 13:12
1
answer

JPA EclipseLink - Does not update entity

I have a relationship in Client JPA 1 - > 0 .. * Loans. So I have in the client class a List Loan set to do OneToMany. It turns out that when I add a client it updates the normal client list, however when I add a loan it does not update the L...
asked by 19.06.2016 / 21:21