Can we customize the ORM relationship?

I generated the object model reverse-engineered from JAVA classes and the data model reverse-engineered from a Oracle database. Now I want to map the object model to the data model manually. Is it possible? If so, how to do that?

Hi xiang,

Thank you for your post. What you wanted is possible. Please follow the instruction below for how to link up a class and an entity.

  1. Assign an ORM Persistable stereotype to the class
  2. Create an ORM Diagram
  3. Open the Model Tree
  4. Drag the class onto the diagram
  5. Drag the entity onto the diagram
  6. Link them up with a ‘Class to Entity mapping’

For details about ORM Diagram, please read:
http://resource.visual-paradigm.com/object_relational_mapping/visual_modeling/using_orm_diagram.html

Please feel free to post again if there are any questions in further.

Best Regards,
Jick

My concern is that if the attribute name of class in object model is not the same as the column name of table in data model, can we have any way to specify the mapping?

Hi xiang,

You can map the attribute with a column through drag and drop:

  1. Press on an attribute
  2. Drag it to the column corresponds to that attribute
  3. Drop

Make sure you are viewing the Attribute mapping (Right-click on the ORM diagram > View > Attribute Mapping).

Best Regards,
Jick