-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to have nullable array column #38
Comments
On a similar note, it is also not possible to insert an empty array. class Test
include Clear::Model
self.table = "test"
with_serial_pkey
column names : Array(String)
end
Test.create({names: [] of String})
|
The second bug is fixed on local on my machine, but the first one is a difficult one. The converter macro system has some limits, and I need to rewrite completely the system. However, there's an issue with macro and generic, and I've raised an issue in crystal. For now I won't fix until I get more information from the crystal team. |
For now, you can manually add a converter on your column: column names : Array(String)?, converter: Clear::Model::Converter::ArrayConverter_String_ It should fix temporarly the bug! |
Related to #43 The problem with I will spend few days working on Clear soon to close this issue and improve the library ! 😄 |
model
I also tested with
Array(Int64)?
andArray(Int32)?
and same errorThe text was updated successfully, but these errors were encountered: