[ 
https://issues.apache.org/jira/browse/ISIS-344?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jeroen van der Wal reopened ISIS-344:
-------------------------------------


When the actual parent is a subclassed the the attribute is not excluded. 

Example:

public class SpecialCustomer extends Customer {
...
}

public class CustomerAddress { 

    @Hidden(where = Where.REFERENCES_PARENT) 
    private Customer customer; 

    @Hidden(where = Where.REFERENCES_PARENT) 
    private Address address; 

    ... 
}

When customer contains an object of type SpecialCustomer it is shown. 
                
> Automatically exclude "parent references" from parented collections.
> --------------------------------------------------------------------
>
>                 Key: ISIS-344
>                 URL: https://issues.apache.org/jira/browse/ISIS-344
>             Project: Isis
>          Issue Type: New Feature
>          Components: Core, Viewer: Wicket
>    Affects Versions: viewer-wicket-1.1.0, core-1.1.0
>            Reporter: Dan Haywood
>            Assignee: Dan Haywood
>            Priority: Minor
>             Fix For: viewer-wicket-1.2.0, core-1.2.0
>
>
> Suppose we have a bidirectional many:many, eg Customer <->* CustomerAddress 
> *<-> Address.
> The CustomerAddress "link" entity has references back to both Customer and 
> Address.
> When viewing the Customer, would like the parented table showing the 
> addresses collection (of CustomerAddress) to show the Address property of the 
> CustomerAddress but not to show the parent Customer property.
> Conversely, when viewing the Address, would like the parented table showing 
> the customers collection (of CustomerAddress) to show the Customer property 
> of the CustomerAddress but not to show the parent Address property.
> In other words, what is shown in the table takes into account the context in 
> which it is shown.
> Proposal to do this is to extend the @Hidden annotation's Where enum:
> public class CustomerAddress {
>     @Hidden(where = Where.REFERENCES_PARENT)
>     private Customer customer;
>     @Hidden(where = Where.REFERENCES_PARENT)
>     private Address address;
>     ...
> }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to