[ https://issues.apache.org/jira/browse/ISIS-2743?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andi Huber reassigned ISIS-2743: -------------------------------- Assignee: Andi Huber > For embedded entity types, contribute their actions to the referencing type. > ---------------------------------------------------------------------------- > > Key: ISIS-2743 > URL: https://issues.apache.org/jira/browse/ISIS-2743 > Project: Isis > Issue Type: New Feature > Affects Versions: 2.0.0-M5 > Reporter: Daniel Keir Haywood > Assignee: Andi Huber > Priority: Major > Fix For: 2.0.0 > > > For example, suppose we have an embedded type that itself defines an action: > {code:java} > @javax.persistence.Embeddable > @Value(semanticsProviderClass = > ComplexNumberJpaValueSemantics.class) > public class ComplexNumber { > private double re; > private double im; > @Action > public ComplexNumber update(double re, double im) { > return new ComplexNumber(re, im); > } > } > {code} > and then we have an entity that uses that type: > {code:java} > @Entity > public class SomePhysicsConcept { > ComplexNumber upper; > ComplexNumber lower; > }{code} > then we should synthesise these mixins on the referencing type: > {code:java} > @ActionLayout(associateWith="upper") > public class SomePhysicsConcept_updateUpper { > public SomePhysicsConcept act(double re, double im) { > somePhysicsConcept.upper = somePhysicsConcept.upper.act(re, im); > } > } > {code} > and similarly: > {code:java} > @ActionLayout(associateWith="lower") > public class SomePhysicsConcept_updateLower { > public SomePhysicsConcept act(double re, double im) { > somePhysicsConcept.lower = somePhysicsConcept.lower.act(re, im); > } > }{code} > > > > > -- This message was sent by Atlassian Jira (v8.3.4#803005)