Scala Slick 3 Relationship to self
This post comes from a question I wrote and answered myself in Stack Overflow about the same topic. I will reorder it here and try to explain the solution I came across. Initial situation First of all I will explain what I had so you can understand the problem. I had the following Categories table:
1 2 3 4 5 6 7 8 9 |
create table "CATEGORIES" ( "id" character varying(50) NOT NULL, "name" character varying(50) NOT NULL, "idParent" character varying(50), CONSTRAINT "CATEGORIES_pkey" PRIMARY KEY (id), CONSTRAINT "CATEGORIES_idParent_fkey" FOREIGN KEY ("idParent") REFERENCES "CATEGORIES" (id) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE NO ACTION ); |
[…]
Filter Option with Slick 3.0.1
After 15 minutes trying to figure out why Slick wan’t giving me the possibility to filter an Option column, I will write a little post about it. Base camp My problem started because of the schema definition that I had. Notice that in order to tell Slick that it should map bar as Option, I was doing it […]
Is it time for functional programming?
Speaking yesterday with my friend Miguel (@miguelcamba), he told me, “hey, take a look at Erlang, it will be very important in the future!” (more or less, because translating our everyday Spanish expressions to English can be almost impossible) I started to think about Erlang and functional programming, because Miguel is some of those early […]