Hello!
I’m working with two entities: Customer and CustomerContact. I’ve created a constraint on an association value for the CustomerContact class:
@JpqlRowLevelPolicy(entityClass = CustomerContact.class,
where = "{E}.user.id = :current_user_id")
void customerContact();
The Customer entity has an attribute called contacts which is a composition of type CustomerContact. The user attribute in my CustomerContact entity is an association to my extended user class, ExtUser. That being said, users with this row level role should be able to see all Customer entities, but only CustomerContact entities where the user field is set to themselves. This is not working. It does, however, filter CustomerContact entities correctly if viewing on a CustomerContact browse screen (which I only added to test).
Am I doing something wrong? I don’t see any documentation pertaining to composition attributes in regards to row level roles.
Let me know if you need me to create a test project for you.
Thank you!
Adam