- 
                Notifications
    You must be signed in to change notification settings 
- Fork 234
Open
Description
Is it possible to achieve something like this:
select * from book where author->>'name' = 'John Doe';
author is a Postgres column of json type and has a field called 'name'. In JPA, this is represented as follows:
@Entity
@Table(name = "book")
@Include
public class Book {
    @Type(JsonType.class)
    @Column(columnDefinition = "JSON")
    private Author author;
    ...
}
public class Author {
    private String name;
    private String phoneNumber;
    ...
}The goal is to filter by the fields that are present in the json column.
Is this possible? Otherwise then the question would be whether it's possible to create a custom operator so that I can create ->> for querying the json fields
Metadata
Metadata
Assignees
Labels
No labels