Default table names don't work for types with generics
mdiep opened this issue · 0 comments
mdiep commented
If declare a generic type to be a model, then the default table name will have angle brackets.
struct Foo<V> {
var id: V
}
extension Foo: PersistDB.Model where V == Int {
static let schema = Schema<Foo>(
Foo.init ~ "Bar" // schema is named "Bar" here
\.id ~ "id"
)
}
This breaks some of the SQL.