jmix-projects / jmix-old

DEPRECATED. Use https://github.com/jmix-framework/jmix
16 stars 3 forks source link

Add entityName attribute to EntityPolicy and EntityAttributePolicy annotations #592

Closed gorbunkov closed 4 years ago

gorbunkov commented 4 years ago

There must be a way to define entity policy and entity attribute policy using entityName, not just entity class.

    @EntityPolicy(entityClass = TestOrder.class,
            actions = {EntityPolicyAction.CREATE})
    @EntityAttributePolicy(entityName = "test_Order",
            attributes = {"number"},
            actions = EntityAttributePolicyAction.UPDATE)
    void order();

entityName attribute is required when we need to define a wildcard value (*)