on 05-15-2007 4:28 PM
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??
Cheers
stefan
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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?
VS
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm seeing the same thing (NWDS 7.0.09)... The import wizard is creating the inherited relations on both the super class and child class, resulting in duplicates showing up in the model class editor (if you show inherited) and during context binding (where you always see the inherited relations)... Using either set of relations on the child class works fine though (you just don't need the extras)...
Hi
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
Stefan
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.