Das letzte das ich auf Facebook postete war ein Kommentar der einen Link zu einer Seite auf Facebook hatte auf dem Fremde ihre vermeintliche neue Liebe suchen, als Antwort auf ein genau solches Gesuch. “Ich habe dich gestern beim so und so gesehen usw. kennt jemand die Person”. Am nächsten Tag hab ich mich aufgeregt…
Read ArticleAuthor: Darko Luketic
PSD2 ist abzocke
Vor diesem PSD2 Gesetz konnte man mit nur der Kontonummer und PIN den Kontoauszug oder Transaktion einsehen und überwachen. Seit PSD2 ist das nicht mehr möglich, weil für jede auch nur kleinste Aktionen ein OTP (sprich TAN) generiert werden muss. Das macht den Vorgang nicht mehr automatisierbar. Obwohl man jetzt schon horrende Preise nur für…
Read ArticleThe stupidity and ambiguitiy of Vue
Rant mode: Which idiots name template references “ref” and then name essentially all composition api variables “ref()” as well!?! YEAH GOOD FUCKING JOB VUE DEVELOPER IDIOTS It makes searching for answer so much more fucking frustrating! Fucking idiots.
Read ArticleSpring Data JPA fixtures
What are fixtures? Fixed data that is always present in the database. You can think of it as the initial dataset. application.properties
|
1 2 3 4 5 6 |
spring.jpa.hibernate.ddl-auto=create spring.jpa.generate-ddl=true spring.jpa.open-in-view=false spring.sql.init.mode=always spring.sql.init.data-locations=classpath:db/data.sql spring.jpa.defer-datasource-initialization=true |
The documentation speaks of “the root classpath”, not knowing Java well I had no idea what that means and an answer on Stackoverflow was of course wrong. It’s not the “src” dir,…
Read ArticleSpring Data JPA Postgres UUID @Id
I read lots of outdated info on this matter. Using PostgreSQL v13+ there is a function called gen_random_uuid(). See the manual page of Postgres UUID. Here’s an example entity called Page
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
package de.icod.blog.model; import javax.persistence.*; import java.util.UUID; @Entity @Table(name = "page") public class Page { @Id @GeneratedValue(strategy = GenerationType.AUTO) @Column(name = "id", nullable = false, columnDefinition = "UUID default gen_random_uuid()") private UUID id; public UUID getId() { return id; } public void setId(UUID id) { this.id = id; } } |
As you see you can append the columnDefinition to the @Column annotation. “UUID default gen_random_uuid()” This translates to following SQL
|
1 2 3 4 5 6 |
create table page ( id uuid default gen_random_uuid() not null constraint "primary" primary key ); |
And you…
Read Article