no category

A New Beginning

less than 1 minute read

The beginning is the most important part of the work Plato

Hello and welcome to my new blog!

I have owned this domain name since 2010 but have never really used it (my old blog, abandoned two years ago, was on a different domain): it’s time for a change!

Read More →

Back to Top ↑

Coding

[SPRING] How to pass a list of tuples to a IN clause using NamedParameterJdbcTemplate

less than 1 minute read

I’d like to share something I recently came across that I think is little known (or at least I didn’t find it in the documentation 😅)

I was working on a jdbc-related @Component and needed a IN clause with multiple tuples. A IN with multiple tuples is something like this:

SELECT * FROM MY_TABLE
 WHERE (COL_1, COL_2, COL_3)
    IN (('AAA', 111, 'X'), ('BBB', 222, 'Y'))

While I was coding I had a doubt: is the NamedParameterJdbcTemplate able to handle it? Fortunately, yes, it does! How? The answer is more trivial than expected!

Read More →

Back to Top ↑

Software Tips

[WSL] How to resolve Operation not permitted error on cloning a git repository

less than 1 minute read

A quick tip!

I just reinstalled Ubuntu WSL on my freshly-formatted laptop. Everything seemed to be working properly but I ran into an annoying problem cloning one of my git repository:

Cloning into 'alessandrococco.gitlab.io'
error: chmod on /mnt/c/Users/alessandro/Projects/alessandrococco.gitlab.io/.git/config.lock failed: Operation not permitted
fatal: could not set 'core.filemode' to 'false'

It’s weird because it’s the thousandth time that I’ve done it and this is the first time I’ve come across this error!

Read More →

Back to Top ↑