Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@crossworth
Copy link
Contributor

When using field.Other the generated code would cause problems on two instances:

https://github.com/crossworth/entissue2290/blob/042ee692b298775220878f08082e6592575eef58/ent/user_create.go#L231
image

https://github.com/crossworth/entissue2290/blob/042ee692b298775220878f08082e6592575eef58/ent/user.go#L56
image
Line 56: conversion from int64 to ID (string) yields a string of one rune, not a string of digits (did you mean fmt.Sprint(x)?)

I'm not sure if this is the best way to solve the problem, but I think we can assume that when the user use a field.Other it would not be ~int64.

This WILL NOT fix the problem when using GoType. The same problem happens, but I don't know how to solve, maybe a better approach would be to check the type.

Partial fix for: #2290

Copy link
Member

@a8m a8m left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing @crossworth ❤️

Thanks for the contribution!

@a8m a8m merged commit f45d29b into ent:master Feb 10, 2022
@a8m
Copy link
Member

a8m commented Feb 10, 2022

@all-contributors please add @crossworth for code

@allcontributors
Copy link
Contributor

@a8m

I've put up a pull request to add @crossworth! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants