Skip to content
Advertisement

Tag: hibernate

What is the difference between CascadeType.REMOVE and orphanRemoval in JPA?

What’s the difference between and This example is from Java EE Tutorial, but I still don’t understand details. Answer From here:- Cascading Remove Marking a reference field with CascadeType.REMOVE (or CascadeType.ALL, which includes REMOVE) indicates that remove operations should be cascaded automatically to entity objects that are referenced by that field (multiple entity objects can be referenced by a collection

MySQL: Unknown system variable ‘tx_read_only’

I’m working on a Java Swing-based application+ Hibernate+Mysql+Spring. When I test CRUD operations, I don’t have problems with read, but in insert statements system shows the message: I have the last version of MySQl Hibernate 4 Java annotations Can you tell me which is the problem to solve now? Answer Just throwing rocks to the darkness, but one possibility could

BCrypt.checkpw() Invalid salt version exception

I’m trying to implement authentication using BCrypt, in my Play 2.1. Java application, but I’m getting Invalid salt version exception when I’m trying to authenticate the user. This is my stack trace I’m using following maven repository: http://mvnrepository.com/artifact/org.mindrot/jbcrypt/0.3m My code is based on the documentation, thus For saving the password (I’m also checking the password for being null) For checking

Spring fails to inject entity manager factory

I writing tests for my DAO classes using JPA, with Hibernate as JPA provider, and Spring 3.2. I am not able to inject the entity manager correctly, I get a NullPointerException when trying to access it. My GenericDAO implementation looks like this: The class of the test looks like this: My root-context.xml is the following: I’ve tried several approaches without

org.hibernate.hql.internal.ast.QuerySyntaxException: table is not mapped [from table]

I’m trying to learn to use Hibernate using MySQL, I’ve never worked with it before and after a chain of errors I finally get stucked with this: I’ve tried with possible solutions of another questions, but nothing, it doesn’t work. This is what I’ve done so far: hibernate.cfg.xml (Folder src) country.hbm.xml (Folder *srcmainresourcesorghibernatetutorialhbm*) country.java Test.java – Edit 20130301 I’ve altered

Hibernate faster EntityManagerFactory creation

In my desktop application new databases get opened quite often. I use Hibernate/JPA as an ORM. The problem is, creating the EntityManagerFactory is quite slow, taking about 5-6 Seconds on a fast machine. I know that the EntityManagerFactory is supposed to be heavyweight but this is just too slow for a desktop application where the user expects the new database

Advertisement