Skip to content
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

Model mapping fails if datatype is Array #208

Closed
taylorfinnell opened this issue Jan 14, 2019 · 4 comments · Fixed by #209
Closed

Model mapping fails if datatype is Array #208

taylorfinnell opened this issue Jan 14, 2019 · 4 comments · Fixed by #209
Assignees
Labels

Comments

@taylorfinnell
Copy link

This is happening in the latest release. I think it as something to do with a property of one of my models being Array(String)

in lib/jennifer/src/jennifer/model/mapping.cr:49: undefined method 'union_types' for TypeNode of type Array(String) (must be a union type)

            {% if value[:type].is_a?(Generic) ? value[:type].resolve.union_types[0] == Bool : value[:type].resolve == Bool %}```
@taylorfinnell
Copy link
Author

Yea, I removed all the Array(String) from my model mapping and it compiled fine

@imdrasil imdrasil added the bug label Jan 15, 2019
@imdrasil imdrasil self-assigned this Jan 15, 2019
@imdrasil
Copy link
Owner

will take a look today

@imdrasil
Copy link
Owner

Hi, please clarify that created fix works for you. I'm doing to create a patch release on this week (including a fix for this issue and several small changes)

@taylorfinnell
Copy link
Author

@imdrasil It works. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants