Questions tagged as 'jpa'

1
answer

Ajax with relational entities Spring Boot

I'm working with Spring Boot, AJAX and jQuery. When I make a request and, in the controller, I return entities without relationships, it brings me the data correctly, but when I create binary relations or n-arias errors occur. In the browser...
asked by 30.09.2017 / 22:44
0
answers

JPA Query to login

Good evening, stackOverflow colleagues, I have a problem when creating the next method that validates a login. public Usuarios loginExist(String username, String password) { try { EntityManager em; EntityTransaction t;...
asked by 24.09.2017 / 04:57
2
answers

Select query with SUM java

I need to make an inquiry by counting the number of hours in a field, this is my code. the field is an integer, since only a number of 2,3,4 hours is saved, it is not required to be a time type. public Object findBySum(Integer iduser){...
asked by 26.09.2017 / 22:12
1
answer

Retrieve object with parameter type date JPA, JPQL, JSF, EJB

Good day, I have the following query I want to search for an object by means of the DATE_ORDEN_TRABAJO the object ORDENTRABAJO I retrieve it very easily by its ID by means of the following query. Entity Consultation @NamedQuery(name = "Orde...
asked by 31.07.2017 / 17:19
1
answer

Initialize a list in my bean with only one record?

Good afternoon, my query is the following one I have a bean that initializes me in its method three lists. @PostConstruct public void inicializarBean() { ordenTrabajoRemisionList = ordentrabajoRemisionFacade.findAll(); ordenTrabajoL...
asked by 17.07.2017 / 19:57
1
answer

Inheritance management with Spring and JPA

Good morning I need to create a repository "B" from a repository "A" which should no longer be modified. I have some doubts about how to proceed since I am having an ambiguity error on my first attempt. I have my repository A: @Repositor...
asked by 04.07.2017 / 18:39
0
answers

Difference between persist () and save () hibernate?

I'm wanting to save an External User this is my controller that interacts with the BD The thing that when I want to save a UsuarioExterno with all your documents I see this error.    org.hibernate.PersistentObjectException...
asked by 22.06.2017 / 03:26
1
answer

Can you specify the database in a query in Java?

I need to connect to a different database at runtime and I do not have the slightest idea how to do it in JPA. I have a database that tells me which one I should connect to according to some parameters to follow. I make my query in the first dat...
asked by 30.05.2017 / 17:43
2
answers

JPA Bean Validation constraint (s) violated while executing Automatic Bean Validation on callback event: 'prePersist'

Error trying to persist entities in JPA    Bean Validation constraint (s) violated while executing Automatic Bean   Validation on callback event: 'prePersist'. Please refer to embedded   ConstraintViolations for details.     
asked by 19.05.2017 / 01:17
1
answer

Java JPA, Liberty and Solr, problem when connecting with Solr, can not find the property file

I'm with a Web Service in Java JPA with server Liberty and Apache Solr as indexer of data. However, at the moment that the application needs to connect to Solr it throws this error    com.ban.cos.solr.SolrConnections: E...
asked by 28.04.2017 / 19:43