[ https://issues.apache.org/jira/browse/ISIS-2235?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Daniel Keir Haywood reassigned ISIS-2235: ----------------------------------------- Fix Version/s: 2.0.0-RC1 (was: 2.0.0-M8) Assignee: Daniel Keir Haywood > Mixins declared using @Property, @Collection or @Action should emit domain > events > --------------------------------------------------------------------------------- > > Key: ISIS-2235 > URL: https://issues.apache.org/jira/browse/ISIS-2235 > Project: Isis > Issue Type: Bug > Components: Isis Core > Reporter: Daniel Keir Haywood > Assignee: Daniel Keir Haywood > Priority: Major > Fix For: 2.0.0-RC1 > > > 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. > ~~~ > because of > [https://github.com/apache/isis/blob/69b4859f27ce857e9af75b7d1ef0ae7b42e5cc2c/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/mixin/MixinFacetAbstract.java#L97] > getDeclaredFields() rather than getFields() > ~~~~ > > for example, with this mixin: > {code:java} > @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; > } > } > {code} > 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...) > > -- This message was sent by Atlassian Jira (v8.20.10#820010)