Skip to Content
avatar image
Former Member

duplicate model property at extended java bean

Hello all!

I am using a java bean model. It contains classes which sometimes extend other classes.

After the import of java bean model, the model class has duplicate properties: one of the current class and one of the super class.

for example:

class Customer

field name

field moneySpent

class GoodCustomer extends Customer

field telephone

even though I do not overwrite the fields name/moneySpent the model class has 5 model relations:

name --->relation name Customer.Name

name --->relation name GoodCustomer.Name

moneySpent --->relation name Customer.MoneySpent

moneySpent --->relation name GoodCustomer.MoneySpent

telephone --->relation name GoodCustomer.Telephone

In the bind context view I can also see the five properties, so I am confused which one to really bind to the context...

I would prefer the GoodCustomer relations, is that correct??



Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    May 16, 2007 at 10:54 AM

    Hi Geert,

    I agree it is not very intuitive to have two model relations visible for the Inherited class.

    One workaround is, incase you only need one relation of the two visible. Go to the

    Model Editor of the Model Class by double clicking on the Model Class GoodCustomer. Go to the Relations tab and remove the relations

    name --->relation name GoodCustomer.Name and

    moneySpent --->relation name GoodCustomer.MoneySpent.

    The Relations tab shows the origin of both the relations in the Target Role column within brackets. This will help you identify the unwanted relation and delete it.

    However you can only delete relations from the sub class and not the super class.

    I hope this helps.

    Best Regards,

    Nidhi Rajshree

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 15, 2007 at 03:37 PM

    Geert || Stefan,

    This sounds like a bug.

    However, never noticed this -- the inheritance was always handled correctly in my projects via JavaBean model import.

    Btw, does wizard incorrectly handles properties or relations? Or both?

    Probably you mapped extra-relations during import?

    And, if you context node to bind model class -- do you see errors or extra attributes?


    Add comment
    10|10000 characters needed characters exceeded

    • Former Member


      We use NW2004 SP 19

      @David, ok thanks

      @VS when importing the model all classes have correct amount of attributes, it dows not have the properteis in the "Properteis" View of the model class, only in the tree view of the model... no errors on context binding, you are just abled to bind both attributes, I wonder hwat happens then 😊

      anyway, it's not a real error, it's just confusing