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 […]
Can’t connect to database with play framework and Heroku?
Deploying a Play framework application to Heroku is really easy, normally you just set Heroku as a git remote branch and push the your code there. Simple. If your app has a database, you will have to configure it for the different environments, so that you don’t get that awful “Cannot connect to database” message. On Saturday I […]
Scala at work
Hi there! I have just written my two first classes and my first trait in Scala at work! It may sound a little bit weird, but I thought, hey, why not? So I wanted to celebrate it and share it with us 🙂 This means that Scala isn’t for me a free time thing anymore, […]