| Author |
Message |
|
2008/04/15 03:16
|
|
|
rameshg
Joined: 2008/03/27
Messages: 11
Offline
|
|
|
|
In my project, I have Classes and the corresponding Entities. If I need to give the mapping between them. What is the best way to do this ?
I tried to create a ORM diagram and dragged the classes and entities there. I could set up the mapping between Classes & Entities through Class-Entity mapping option.
But I could not see an option to provide the mapping between Attribute & Columns. Is there a way to do set up Attribute - Column mapping before I start code generation ?
Sample ORM Diagram is attached.
Note: I receive ER diagram from database group, so I do not create entities. My job is to provide the link between classes and entities before generating code & hibernate mapping files.
Attached Image :
No description given
(6 kb)
|
|
|
|
 |
| |
|
2008/04/15 14:41
|
|
|
LilianWong
Joined: 2008/02/22
Messages: 452
Offline
|
|
|
|
Hi rameshg,
Thanks for your post. By default, the classes/entities generated via synchronization will be mapped automatically. When you right-click on the ORM diagram and select View > Attribute Mapping in the popup menu, the mapping between the columns and the attributes will be shown.
If you want to map existing unmapped classes and entities, simply select the column and drag over the attribute to create mapping. Here is the link of the flash movie showing how to create mapping between existing unmapped classes and entities:
http://files3.visual-paradigm.com/200804/Lilian/movie/attribute_mapping.htm
I hope these will help. If there are any inquiries, please feel free to ask.
Best regards,
Lilian Wong
|
|
|
|
 |
| |
|
2008/04/15 23:06
|
|
|
rameshg
Joined: 2008/03/27
Messages: 11
Offline
|
|
|
|
That was very clear and helpful. Thanks !
|
|
|
|
 |
| |
|
2008/04/15 23:52
|
|
|
rameshg
Joined: 2008/03/27
Messages: 11
Offline
|
|
|
|
Well, it worked. But once I map the Class to some entity, later I am not able to change the mapping to a different Entity. Say, first I mapped Class1 to Entity1. Then I realized it is wrong, I should have mapped it to Entity2.
I tried deleting the Class1-Entity1 mapping line from the diagram. But it somehow doesn't go. When I refresh the diagram (change the View to Attrib mapping and switch back to Class mapping), Class1-Entity1 mapping comes back.
See attached image. By this time I have deleted the Class1-Entity1 Mapping. It is not showing up in the diagram. Now I want to set the mapping between Class1-Entity2. So I click Class-Entity mapping from the tool bar and then mouse over Class1, I am not allowed to click on Class1.
Attached Image :
Description : Changing Entity mapping for a class
(11 kb)
|
|
|
|
 |
| |
|
2008/04/16 10:42
|
|
|
LilianWong
Joined: 2008/02/22
Messages: 452
Offline
|
|
|
|
Hi rameshg,
Thanks for replying. I've forwarded your details to our engineers to follow-up. If there is any feedback, I'll inform you at once.
Best regards,
Lilian Wong
|
|
|
|
 |
| |
|
2008/04/17 17:38
|
|
|
LilianWong
Joined: 2008/02/22
Messages: 452
Offline
|
|
|
|
Hi rameshg,
I would like to let you know that the problem about deleting Entity-Class Mapping is fixed in our application. Please download the patch in the following link and have a try to see if it works.
http://files3.visual-paradigm.com/200804/Patch/sp1_20080417a/VP_Suite_Windows_3_2_sp1_20080417a.exe
To use the patch:
1. Exit any running instance of VP
2. Install by overwriting the current installation
3. Restart the product.
Note: This patch is made for VP Suite 3.2 SP1 (VP-UML 6.2 SP1). Please make sure you have a valid product license. Otherwise you won't be able to start up the product after the installation.
If you need any assistance, please do not hesitate to contact me.
Best regards,
Lilian Wong
|
|
|
|
 |
| |