Description
More straightforwardly, Object_logicalTypeName mixin doesn't emit events of any sort (that I can find). It ought to emit a property domain event, as declared by @Property(domainEvent=...).
That suggests executing some facets associated with the OneToOneAssociationMixedIn, perhaps could be installed using a PostProcessor (which acts after the mixin members exist).
~~~
Original problem as raised:
In particular, doesn't properly create domain events if abstract and invoke via the wrapper (ie during integ tests)
fix? don't use getDeclaredFields, instead getFields (I think... to test)
example in estatio - HasDocumentAbstract_categoriseAbstract subclasses.
getDeclaredFields() rather than getFields()
~~~~
for example, with this mixin:
@Property public class SimpleObject_self { private final SimpleObject simpleObject; public SimpleObject_self(SimpleObject simpleObject) { this.simpleObject = simpleObject; } @ActionLayout(contributed = Contributed.AS_ASSOCIATION) public SimpleObject prop() { return simpleObject; } }
it's necessary to specify @ActionLayout, otherwise the behaviour is contributed as both an association and an action.
The @ActionLayout should be inferred.
~~~
See the same for @Collection and @Action also ... should imply AS_ASSOCIATION and AS_ACTION respectively.
~~~
Also, (and this might be a slightly different issue), the facets defined by @Property(...) should be copied down correctly to the corresponding facets on the action, eg domain event (this might need specifying more precisely...)
Attachments
Issue Links
- is duplicated by
-
CAUSEWAY-2650 [DUPLICATE] Support domain events for property and collection mixins
- Closed
- is fixed by
-
CAUSEWAY-3409 The 'executing' and 'executed' domain events don't fire for mixin actions; see demo app.
- Closed
- relates to
-
CAUSEWAY-2492 Metamodel contributing members are not inheritable from abstract super class.
- Closed