Problem Hi guys below is my code to generate random long unique Ids, I use System.nanoTime to generate long Id […]
Tag: hibernate
Inserting 100000 records to MySQL takes too much time
Problem I’m using spring boot, hibernate any MySQL for reading 100000 records from csv file and write the same to […]
Hibernate insert with foreign key
Problem Ι have the following database: SET SQL_MODE = “NO_AUTO_VALUE_ON_ZERO”; SET time_zone = “+00:00”; CREATE TABLE IF NOT EXISTS `Authors` […]
Optimization of Hibernate DAO in desktop application
Problem I’m working on medium sized desktop application (with around 100 tables in database). For persistence layer I decided to […]
Repetitive code for different Database Entities with same implementation
Problem I have this code in LogInService public User isValid(User user) { if(user == null) return user; User db_user = […]
Shortening JPA criteria query boilerplate
Problem I’ve used hibernate for a long time. Recently I started using JPA, but I can’t find a short way […]
Refactoring duplicated code with abstraction and generics
Problem I have written simple command line project with Spring. And from what I think quality of code is pretty […]
Inserting 100000 records to MySQL takes too much time
Problem I’m using spring boot, hibernate any MySQL for reading 100000 records from csv file and write the same to […]
improved HibernateDao
Problem I have this HibernateDAO.java Class: public abstract class HibernateDAO implements DAO { private static final SessionFactory sessionFactory; private static […]
Method Calculate User Answers
Problem I am writing spring hibernate app to make online test and this method for calculating user grade I have […]