Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Scala Slick table tag

Tags:

scala

slick

In slick table there is a tag parameter:

class Companies(tag: Tag) extends Table[Company](tag,"COMPANY") {...} 

What is it used for, and is there any way not to write it with each table class definition?

like image 874
Taras Bilinsky Avatar asked Aug 06 '15 07:08

Taras Bilinsky


1 Answers

The best answer I've seen is: https://stackoverflow.com/a/27783730/154248

What's it used for: imagine you needed to join a table on itself. That tag is a way to distinguish between the tables taking part in a query.

like image 125
Richard Dallaway Avatar answered Sep 30 '22 03:09

Richard Dallaway