My system had sporadic crashes and I discovered that this happened due to processes that opened a connection but, due to some error, they did not close it (connection leak).
I solved involving the problematic code in try/catch and forc...
I'm using JPA NamedQuery to create a DTO. And in my Query I have as condition an IN and as parameter IN has values with white spaces in the middle. (Ex: 9292-929). and these values with whitespace, returns nothing. Only values with no...
I'm trying to create a Java application where I need to set up two databases: MongoDB and MySQL. My idea is to use Spring-Data with Hibernate for both banks, but I found only tutorials for setting up Cross-Store between the banks.
Is there an...
In my current Spring project, I'm facing the following issues when trying to save an entity that references another (with foreign key), with this:
@Entity
@Table(name="pagina")
public class Pagina {
@Id
@Column(name = "id")
@Gener...
I know this error is derived from trying to fetch some data from the database, when I do not have any open session.
But the biggest problem for me is that this error is appearing to me completely random, as I am developing a server that proce...
Is there any client (like: pgadmin3, Oracle SQL Developer, Mysql Workbench)
to query in JPQL?
I have a project that uses jpa, and I need to debug the generated jpql's.
I've seen that Squirrel does this, but for HQL.
I'm having a problem in a @ManyToMany entities relationship. When I try to do a simple query on the entity that contains the @ManyToMany stackOverflow occurs.
My rule is simple: My entity ApplicationClientVO can access N WebServiceVO and a We...
I'm having trouble finding Google and have not found a solution.
I have a note in JPA with a set<> I want to limit the size of objects within set , ie the code below:
@OneToMany(mappedBy = "pidAplic", cascade = CascadeT...
I need to keep a log of all transactions of an entity with Hibernate Envers. I configured persistence.xml as follows:
<!-- Configurações do Envers -->
<property name="hibernate.ejb.event.post-insert" value="org.hiberna...
I am changing the code of a query because it will return a lot of data when the database is well populated. I'm paging the query. The problem is that when they implemented it, they did the following:
You get a string, and you make all possibl...