[ 
https://issues.apache.org/jira/browse/ISIS-1311?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15159879#comment-15159879
 ] 

ASF subversion and git services commented on ISIS-1311:
-------------------------------------------------------

Commit 4ccb9caa1293e3d0e4e5feb6f90319050692f42f in isis's branch 
refs/heads/ISIS-993 from [~danhaywood]
[ https://git-wip-us.apache.org/repos/asf?p=isis.git;h=4ccb9ca ]

ISIS-1311: sorted out issue with Persistable mixins (return Long, not Object, 
otherwise trips up).

Also, fixed issue with tables that were incorrectly showing the datanucleusId 
and datanucleusVersion because of how check for HiddenFacets against mixin 
associations.  Now generalized/improved the lookup of facet (had a different 
facetType key in the ObjectAssociationMixin compared to the underlying 
ObjectActionDefault).


> Mixins for Persistable metadata causes exception when rendering.
> ----------------------------------------------------------------
>
>                 Key: ISIS-1311
>                 URL: https://issues.apache.org/jira/browse/ISIS-1311
>             Project: Isis
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.11.1
>            Reporter: Dan Haywood
>            Assignee: Dan Haywood
>             Fix For: 1.12.0
>
>
> one (or both) of these causes issue (this in the 
> github.com/incodehq/contactapp)
> {code}
> @Mixin
> public class Persistable_id {
>     private final Persistable persistable;
>     public Persistable_id(Persistable persistable) {
>         this.persistable = persistable;
>     }
>     @MemberOrder(name = "Metadata", sequence = "1")
>     @Action(semantics = SemanticsOf.SAFE)
>     @ActionLayout(contributed = Contributed.AS_ASSOCIATION)
>     @PropertyLayout()
>     public Object $$() {
>         final Object objectId = JDOHelper.getObjectId(persistable);
>         if(objectId instanceof DatastoreId) {
>             final DatastoreId datastoreId = (DatastoreId) objectId;
>             return datastoreId.getKeyAsObject();
>         }
>         return null;
>     }
>     public boolean hide$$() {
>         return $$() == null;
>     }
> }
> {code}
> and/or
> {code}
> @Mixin .. 
> public class Persistable_version {
>     private final Persistable persistable;
>     public Persistable_version(Persistable persistable) {
>         this.persistable = persistable;
>     }
>     @MemberOrder(name = "Metadata", sequence = "2")
>     @Action(semantics = SemanticsOf.SAFE)
>     @ActionLayout(contributed = Contributed.AS_ASSOCIATION)
>     @PropertyLayout()
>     public Object $$() {
>         return JDOHelper.getVersion(persistable);
>     }
>     public boolean hide$$() {
>         return $$() == null;
>     }
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to