Persistable class with sequence diagram

I would like to use persistable class in a sequence diagram. But I have a problem because I would like to call functions that are generated for persistable class but they are not shown in it. For example: save, delete, create… functions are by default generated for persistable class, but they can not be used in sequence diagram.

And one more question: Is it possible to set property (C#) thru sequence diagram???

Hi igor,

Thank you for your enquiry regarding calling functions for persistable classes. I will pass it to our engineers and get back to you as soon as possible.

For the second question, here are the steps to set property through sequence diagram:

  1. Select a LifeLine which has base classifier defined.
  2. Right-click on it and select Open Specification from popup menu.
  3. Click on the button for the base classifier to display the specification dialog box for the class.
  4. From the Class Specification dialog box, open Attributes tab.
  5. Select the attribute.
  6. Click on Open Specification…
  7. From the Attribute Specification dialog box, open Stereotypes tab.
  8. Double-click Property to move it to the stereotypes selection of the attribute. This defines the attribute as a property.
  9. Open General tab.
  10. At the bottom of the dialog, check if the attribute is a Getter and/or a Setter.
  11. Click OK/Apply to confirm the changes.

Hope this helps.

Best Regards,
Jick

Great! This part was really helpful. I hope you could solve first part of the question.

Maybe one more question under the same topic. If I have two entities Recipe and Ingredient and they are in following relationship:
One Recipe has one or more Ingredient.

In this case Ingredient will have foreign key from Recipe (recipeID).

When we do synchronization to class diagram in Ingredient persistable class we can not see recepieID column. We can not even set it thru get or set method.

I really appreciate your work and I hope you could answer me to those questions.
Thank you.

Hi igor,

It is normal that the foreign key in Ingredient doesn’t show in Class Diagram. This is because the relationship between Recipe and Ingredient, represented in ERD, is converted to association in Class Diagram.

For the generated code, you can set a Recipe object from an Ingredient object by calling the set method, or by adding an Ingredient object to the Ingredient collection from Recipe object.

Like this:

Method 1

recipe.ingredient.add(ingredient);

Method 2

ingredient.setRecipe(recipe);

If there are any questions, please let me know.

I know that. But UML methodology was mentioned as visual programming methodology. But I do not know how could I call »recipe.ingredient.add(ingredient);« with UML sequence diagram.

I hope you will send me the answer as you promise.

Hi igor,

Sorry for my late reply.

Regarding your enquiry, we will allow selecting those generated methods for ORM classes in Sequence Diagram. We are also considering to display those methods in Class Diagram. But I am sorry that these changes will not be available soon.

Best Regards,
Jick

Thank you. I just needed to know.