Filter by user role #48702
Unanswered
iamkhusainov7
asked this question in
Symfony Book: The Fast Track
Filter by user role
#48702
Replies: 2 comments
-
I would set the column in jsonb, then use Json function on it. Json operator are not native With doctrine. But there are a few doctrine extension to handle Json function |
Beta Was this translation helpful? Give feedback.
0 replies
-
I wrote a blog post about this a few years ago: https://endelwar.it/2020/08/filter-users-by-role-in-symfony-5/ It also works on Symfony 6 β you'll find the PostgreSQL code in the comments section. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello! I am using PostgreSQL 14+ and symfony 6.2. I am trying to filter users by theirs role, could you please tell me how it can be done? I tried several approaches, but none of them worked :/ As I got the issue is with jsonb roles column. Could any one help me?
Beta Was this translation helpful? Give feedback.
All reactions