Querydsl with Spring Boot, Hibernate & Gradle

Querydsl is a framework which supports writing type safe queries with back-end services like JPA, MongoDB, SQL and etc.

Rather than constructing queries with String or XML, we can leverage Querydsl’s fluent API for the type safety.
I faced few difficulties in configuring Querydsl in Gradle. Querydsl needs generated model classes from the Hibernate model classes.

However, to do this job, a plugin is required. For Maven that plugin is maintained by Mysema,which also maintains Querydsl. This is the link for Gradle plugin developed by ewerk(I found the website broken).  Some tweaks are needed to make this plugin work with Gradle 5 and onwards.
The following is a build.gradle file – 

Read more

Pep Talk With My Younger-self: Welcome to the Worlds of Bytes

So you’ve decided to pay your bills by coding? Well, you better be prepared.
You (my youngerself) have guts I’d say.

This is one fine morning while the whole world is seeing numerous deaths due to COVID-19, everyday than new node modules being pushed to npm.

The world you see from colleges, Unis and academia, does not match truly in the scenario.
You need to push codes every now and then. you are literally lured by the fancy buzzwords,
constantly being questioned to check your existence. You literally become BTV and no one cares.

See, This is negativity. Don’t be a part of it. Let node modules be published and pushed in npm.
There is nothing wrong. We are cool.

Enough with the intro, let’s get to some serious talk.

Read more

Handling isolation for Transactional operations

This is not my own writing. Instead, I am assembling useful resources into a blog for my own understanding. Reference of resources will be present at the end of the blog.

A transaction is a collection of read/write operations succeeding only if all contained operations succeed. In order to maintain consistency in a database, before and after the transaction, certain properties are followed. These are called ACID properties.

  1. Atomicity
  2. Consistency
  3. Isolation
  4. Durability

Read more