You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@isis.apache.org by Willie Loyd Tandingan <ta...@gmail.com> on 2016/01/19 07:27:02 UTC

In-memory domain objects

Hello!

We're currently using a modified version excel addon to import data from an
excel file. We want to have more control of our import process by using a
domain object with nature INMEMORY_ENTITY so we could perform validations
in it, then call an action through a wrapped domain service. As far as I
have observed, the domain object needs to implement ViewModel.Cloneable for
DomainObjectContainer#validate to proceed due to
DisabledFacetOnPropertyDerivedFromRecreatableObject.

Is it possible to remove the deprecated @Hidden annotation on
ViewModel.Cloneable#clone? It currently causes metamodel validation to fail
and we don't want to set isis.reflector.validator.allowDeprecated.

Is there another way to automagically implement clone for view models? We
are currently using MementoService with
DomainObjectContainer#newViewModelInstance based on the not-yet-released
isis-wicket-wizard module.

Thanks!

Re: In-memory domain objects

Posted by Dan Haywood <da...@haywood-associates.co.uk>.
Hi Willie,
... within

On 19 January 2016 at 06:27, Willie Loyd Tandingan <ta...@gmail.com>
wrote:

>
> Is it possible to remove the deprecated @Hidden annotation on
> ViewModel.Cloneable#clone? It currently causes metamodel validation to fail
> and we don't want to set isis.reflector.validator.allowDeprecated.
>
>
Yes, that seems reasonable; ISIS-1298 [1]





> Is there another way to automagically implement clone for view models? We
> are currently using MementoService with
> DomainObjectContainer#newViewModelInstance based on the not-yet-released
> isis-wicket-wizard module.
>
>
I would imagine there is.  At the moment the RecreateableObjectFacet impl
for @ViewModel and also @XmlRootElement (1.11.0) return false for
isCloneable(), but my thinking is that these could probably transparently
support cloning.  I've raised ISIS-1299 [2] for this and will see if I can
implement it.

Cheers
Dan


[1] https://issues.apache.org/jira/browse/ISIS-1298
[1] https://issues.apache.org/jira/browse/ISIS-1299