To encode sum types / subtyping I am attempting to use the table per class strategy, similar to the shared primary keys strategy.
However I am running into a very strange not in scope error when modeling nested inheritance:
The following works and seems to give me what I want (if a bit hacky):
Vehicle
Car
vehicle VehicleId sql=id
Primary vehicle
Bike
vehicle VehicleId sql=id
Primary vehicle
However it breaks when I append the following to the bottom:
Coupe
car CarId sql=id
Primary car
Sedan
car CarId sql=id
Primary car
With the following error:
• Not in scope: type constructor or class ‘VehicleId’
• In the quasi-quotation:
[persistLowerCase|
This is with persistent-2.9.2 and persistent-template-2.6.0.