Hidden not accepted for ManyToOne property

  • Marc


    Sorry for the confusion, but problem described below is already resolved.

    In fact, I observed meanwhile that, even without the @Hidden annotation, the-many-to-one relationship is not shown when adding it from the "owner" entity. So that is OK for me as it is.

    I leave my problem description here below just for reference (I can't delete an item anyway).


    Her under follow the original decription of the yet resolved problem:

    I am making a standard one-to-many relationship between Proposal and ProductOrder

    public class B_Proposal { 
    @OneToMany (mappedBy="btProposal", cascade=CascadeType.REMOVE)
    private Collection<B_ProductOrder> product;
    public Collection<B_ProductOrder> getproduct () { return product;}
    public void  setproduct(Collection<B_ProductOrder> p) { this.product = p;}  

    And then productorder:

    public class B_ProductOrder { 
    @Hidden @ManyToOne 
    private B_Proposal btProposal;
    public B_Proposal getbtProposal () { return btProposal;}
    public void  setbtProposal (B_Proposal p) { this.btProposal = p;}

    I get the following error though:

    Hidden annotation is not applicable to btProposal. It can be applied to properties

    My question is:
    -btProposal is a property, right? Why is @Hidden not applicable then?
    -it is only normal to hide the rather technical property btProposal that only serves to implement the logical one to many relationship. Can btProposal be hidden easily (without needing to write views)

    Thanks for your help,

    Last edit: Marc 2013-06-09