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

Query with JSON type #4031

Open
nnpvaan opened this issue Apr 24, 2024 · 0 comments
Open

Query with JSON type #4031

nnpvaan opened this issue Apr 24, 2024 · 0 comments

Comments

@nnpvaan
Copy link

nnpvaan commented Apr 24, 2024

I have add one field that using JSON in schema:

field.JSON("additional_fields", map[string]interface{}{}),

But when I query that likes:
user, err := r.client.User.Query().Where(user.ID(userID)).Order(ent.Desc(user.FieldCreatedAt)).First(ctx)

It got error:
pq: could not identify an equality operator for type json

How can I fix that?

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

No branches or pull requests

1 participant