Questions tagged as 'jpa'

1
answer

Load objects related to @OneToOne

Regarding the doubt that I have is basic, but it is taking my sleep. I have an entity that I call Destination. In the Destination entity I have several relationships of type @OneToOne with other entities in a unidirectional way as belo...
asked by 26.09.2014 / 18:41
1
answer

javax.persistence.PersistenceException (no security manager: RMI class loader disabled)

I created a policy file that gives the permission for my machine to run both the client and the server, I also passed the ports to them. Inside the server I instantiate RMI Security (since if I take it the policy does not work) Server started...
asked by 22.11.2015 / 17:01
1
answer

Data modeling via JPA and Hibernate

I am doing a project with JPA for a quotation system and I have doubts on how to build the relationship between classes, and would like (if possible) some opinions. My project is a quotation system, where the company will create a quote and s...
asked by 08.08.2015 / 22:16
2
answers

NullPointerException Java JPA CDI Tomcat

Good afternoon, guys. I'm developing a Java test application with JPA, CDI and Tomcat. I created a basic test class and I'm getting the following error. Erro: Exception in thread "main" java.lang.NullPointerException at br.com.hcancerbarre...
asked by 29.07.2016 / 21:52
1
answer

JSF / Hibernate How do I write null to a bank field?

I have an application using Primefaces / JPA-Hibernate / TomCat8, and need that when an on-screen field is empty, it writes null to the database (Postgres). I need this because I have some fields in the database that have UniqueKey, and e...
asked by 07.11.2015 / 17:31
1
answer

JPA - Error of record not found soon after insertion of same

A question regarding JPA procedures, due to an error that has happened and I can not understand. I'm taking care of a part of the system that feeds a card order table. It looks up if the user that the request references has the card, and it i...
asked by 24.04.2015 / 22:04
2
answers

How hibernate.hbm2ddl.auto works?

What values can I use in this property? ex: Update <prop key="hibernate.hbm2ddl.auto">update</prop> How does it work? When should I use it? is it a good practice?     
asked by 05.10.2015 / 17:15
2
answers

How to resolve this 'java.lang.IllegalArgumentException: Unknown entity' when running this simple application?

I'm new to the Hibernate world and when I run this application, I get the following exception: java.lang.IllegalArgumentException: Unknown entity: com.nataniel.api.domain.User at org.hibernate.ejb.AbstractEntityManagerImpl.persist(Abstrac...
asked by 27.11.2016 / 02:42
2
answers

What is JPA's mappedBy for?

Example: @OneToMany(mappedBy = "chemical", fetch = FetchType.LAZY) @LazyCollection(LazyCollectionOption.EXTRA) @JsonIgnore private List<SimulationChemicals> simulationChemicals; Why is the use of mappedBy mandatory or important? I...
asked by 08.01.2016 / 18:23
1
answer

High memory consumption Swing Java application

I'm developing a Java application, but when I run some tests, I noticed that when I run the application, my memory consumption increases. And according to usage, it always allocates more and more memory. It does not happen to drop the memory use...
asked by 14.04.2015 / 21:08