I am using Xtensive.Orm.Security extensions (4.6.4). I have added this assembly in the Domain build process.
However, I cannot query the roles : when executing Query.All<role>().ToList(), i get the exception : Type 'Role' not found in model.
I can see there is not table in the database for Xtensive.Orm.Security.Role. I guess it's because there are only abstract entities in this assembly.
Can I workaround this other than adding a layer in the role hierarchy, like adding MyRole : Role and inheriting existing roles from MyRole instead of Role and then doing Query.All<myrole>() ?
Hello Benoit Nesme
Actually, you must create some implementation of Role and mark one of descendants of Role by HierarchyRootAttribute.
Xtensive.Orm.Security.Role is abstract class which is directly interited from Xtensive.Orm.Entity. It does not belong to any hierarchy. Like Entity, Role serves as base class for user classes of model, but it defines group of classes with special purpose - roles.
answered Sep 09 '15 at 07:23
Querying the interface IRole instead of Role solves the issue.
answered Sep 09 '15 at 07:27