Perfect
Patrick
Am 20.10.2017 um 14:14 schrieb Dan Haywood:
Hi Patrick,
I agree, it should be possible to do what you want. I've raised a ticket
[1] for it.
In the meantime, go with nature=VIEW_MODEL and add a TODO in your code to
update when we make the fix.
Thx
Dan
[1] https://issues.apache.org/jira/browse/ISIS-1749
On Fri, 20 Oct 2017 at 13:11 Patrick Pliessnig <[email protected]>
wrote:
It passes validation effectively with nature = Nature.VIEW_MODEL
indicating (as much as I can see) that the view model belongs to the
application layer.
But using
nature = Nature.INMEMORY_ENTITY or
nature = Nature.EXTERNAL_ENTITY
to indicate that the view model is just a proxy for other domain objects
in the domain layer generates this validation error:
... has multiple incompatible annotations/interfaces indicating that
it is a recreatable object of some sort
(RecreatableObjectFacetForDomainObjectAnnotation and
RecreatableObjectFacetForXmlRootElementAnnotation)
So, I don't know how to specify that a jaxb view model is - say - a
proxy for an external entity as I can do with legacy view models.
Am 20.10.2017 um 13:22 schrieb Jeroen van der Wal:
This is how I use it:
@DomainObject(nature = Nature.VIEW_MODEL, objectType = "MyJaxbViewModel")
@XmlRootElement(name = "myJaxbViewModel")
@XmlType(
propOrder = {
"myIncludedProperty"
}
)
@XmlAccessorType(XmlAccessType.FIELD)
public class MyJaxbViewModel {
@Getter @Setter @Nullable
private String myIncludedProperty;
@Getter @Setter @Nullable
private String myIncludedProperty;
@XmlTransient
private String myExcludedProperty;
}
HTH
On 20 October 2017 at 12:28, Patrick Pliessnig <[email protected]>
wrote:
Hi
Modeling a JAXB view model with @XmlRootElement and its nature with
@DomainObject( nature = ... ) does not pass metamodel validation.
Is there way to indicate the nature of a JAXB view model?
Eg. whether it belongs to the domain model or the application layer.
thx
Patrick