Hi all,
I am having a problem with attribute permissions for attributes that are derived from a mapped superclass.
For example, the mapped superclass is Person and has a field “name”.
The derived class is Customer and I have set view permissions on all attributes.
Usually, in screens, everything works well but now I am trying to make a query for the count of Customers and I am using the ValueLoadContext for that:
ValueLoadContext context = ValueLoadContext.create()
.setQuery(ValueLoadContext.createQuery("select count(e) from rlm_Customer e where e.name = :name")
.setParameter("name", "William")
).addProperty("count");
This fails because the query is parsed and the RdbmsStore.java finds the property path in “checkValueQueryPermissions()” (line 954).
There it is checked if I have permission for Person:name and not Customer:name. I guess that happens because the ValueLoadContext is not typed like other queries? The problem is that I can’t give permissions to the mapped superclass because it does not show in the role editor. Would it be wise to just add the permission by hand in the text view of the role? Or is there another workaround?
Thank you very much in advance!