I have a Inheritance structure (see picture)
And i have mapped hierarchy to one table.
The problem is i will get 2 columns name attr1 in the ERD.
I only need one, because the structure prevents objects from being both types, so under no circumstances there could be an object using both at the same time.
Is there a way in VP uml to tell the ERD that both attributes map to the same column?
OR do i have to make the changes manually in the generated hbm.xml’s?
Thank’s in advance
Thanks for your post. May I know where does “attr1” exist?
If the super class has “attr1”, the sub-classes will have the same attribute “attr1”.
the gray boxes represent classes in our domain model.
The boxes that contain ATTR1 there exists an attribute ATTR1.
As you can see non of their shared parents have this attribut.
Hi Michael Nitschke,
Thanks for replying. I’m still unclear of “how did you define attr1 in the classes” (i.e. you add attribute to the sub-class and name it “attr1”, or you have this attr1 in super-class and then you create classes to inherit the super-class)…
Another point is: the result of synchronization depends on the inheritance strategy (which can be defined in “ORM Code Detail” tab in specification dialog of sub-class in the hierarchy).
Could you please post an example of the class diagram you modeled together with the ERD resulted from synchronization from the class diagram? Thanks in advance!
To end this question and also provide an answer.
This is the response from the Tech-support from VP
Dear Michael Nitschke,
Thanks for replying. I’m afraid that your case is our current limitation. > In our ORM, we assume attributes and columns are mapped 1:1. This is > correct for most of the case. But for your case, since the attr1 is shared > in 2 level of class, but not all subclass want to have it, this imply 2
attributes need to map to same column.
This involve complex editing checking and currently we have no plans
to support this kind of mapping. I’m sorry about this fact. If you need
any help, please do not hesitate to contact me.