Reputation: 589
I have stored the following object in hstore data type in Postgres
"verified": { "dob": "true", "name": "false", "email": "true" },
How can i query where "dob" = "true"?
Upvotes: 1
Views: 858
Reputation: 4444
You can write the clause as a string:
this.yourEntityRepository.find({ where: "verified -> 'dob' = TRUE" })
or
this.yourEntityRepository.createQueryBuilder().where("verified -> 'dob' = TRUE").getMany()
Upvotes: 3