I have SQL table inheritance implemented this way:
Table Shape:
Column | Type
------------+---------
shape_id | integer
square | foat
name | character varying(64)
Table Triangle
Column | Type
------------+---------
shape_id | integer
a | float
b | float
c | float
Foreign-key constraints:
"fkey1" FOREIGN KEY (shape_id) REFERENCES Shape(shape_id)
Table Circle
Column | Type
------------+---------
shape_id | integer
r | float
Foreign-key constraints:
"fkey2" FOREIGN KEY (shape_id) REFERENCES Shape(shape_id)
Is it possible to use slick to create a class model where Triangle extends the form and Circle extends the form?
I saw this question , but I do not like the approach where all columns of views are placed in the same table as nullable.
Thanks!
source
share