We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Array(T)
Model.schema
1 parent ecf58ca commit 527caedCopy full SHA for 527caed
1 file changed
src/onyx-sql/model/schema.cr
@@ -113,8 +113,8 @@ module Onyx::SQL::Model
113
end
114
115
if type <= Enumerable
116
- if type.type_vars.size != 1
117
- raise "Cannot use #{type} as an Onyx::SQL instance variable for #{@type}"
+ if !(type <= Array) || type.type_vars.size != 1
+ raise "Cannot use #{type} as an Onyx::SQL instance variable for #{@type}. Only Array(T) is supported for Enumerable"
118
119
120
type = type.type_vars.first
0 commit comments