Skip to content

Commit 527caed

Browse files
committed
docs: state that only Array(T) is supported in Model.schema
1 parent ecf58ca commit 527caed

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/onyx-sql/model/schema.cr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,8 @@ module Onyx::SQL::Model
113113
end
114114

115115
if type <= Enumerable
116-
if type.type_vars.size != 1
117-
raise "Cannot use #{type} as an Onyx::SQL instance variable for #{@type}"
116+
if !(type <= Array) || type.type_vars.size != 1
117+
raise "Cannot use #{type} as an Onyx::SQL instance variable for #{@type}. Only Array(T) is supported for Enumerable"
118118
end
119119

120120
type = type.type_vars.first

0 commit comments

Comments
 (0)