-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add support for adding a child that is typed by a polymorphic association #12
Comments
@atanaka This is the issue you saw when trying to add a child party to an organization. We try to create an empty Party (or template object), for default values etc, but since it is abstract, that fails. |
Depends on abstratt/cloudfier#87. |
Hello, Could you provide sample model code to produce above? Did you use Composition or Association? Thank you in advance. |
Hi @atanaka san, happy new year! I used aggregation:
I opened #13 to handle the association case. I noticed too the composition case is not working well (the entities are not considered top-level and as such disappear from the navigation bar). There may other cases not properly handled yet. |
Happy New Year! Thanks for the response. Your model code did not work under my environment. What I did and happened was:
Did I miss something? Thank you for your time in advance. |
Akira, in this case persons and organizations may exist regardless whether they are part of an organization or not (the parent relationship is optional - [0..1]). That is why you see the new P1 person in the persons list. Similar case: It seems you expected child persons/organizations that belong to an organization not to show as part of the global listings of persons and organizations. That may be something worth considering, but I would be a feature on its own. If the lack of such feature blocks a use case you have, please open an issue explaining it. A way of achieving what you expect now would be to add a query to filter persons by whether they are part of an organization or not. Here is the updated model:
Note that because of abstratt/textuml#89 I had to convert the organization association end to a member-owned end (it was association-owned initially). Also, because of #15, the organization for a person/suborganization no longer shows on the list view. |
@atanaka Not sure you got a notification for my reply above, I forgot to mention your github handle. |
Thank you for quick response.
That is fine and that is what I expected. I would try to explain more below. When I click + mark on Party(Person) from Organization instance, I expect to see a list of all registered (or already created) Person instances as candidates (shown by content assist). But actually I do not see any candidate Person instances. I do not know if this is the expected behavior or an issue. Also, when Person class and Organization class are treated as master class, they may be created and maintained independently, and when new organization is added, selected and existing persons will be added as members of that organization at that creation time. That's why I expected to see candidate list with content assist. I understand that this may be a special use case. I would appreciate if you could clarify on this point (your design choice or an issue). Thank you very much in advance. |
Add support for adding a child object that is typed by a polymorphic association.
Right now we try to use a type that maybe subclassed and either don't offer the user a chance to choose a type that is more specific, or fail due to the type not being instantiable.
The text was updated successfully, but these errors were encountered: