Skip to content
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

Class: possibility of adding the same attribute to one class #8

Open
FChikh opened this issue Oct 12, 2023 · 0 comments
Open

Class: possibility of adding the same attribute to one class #8

FChikh opened this issue Oct 12, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@FChikh
Copy link
Collaborator

FChikh commented Oct 12, 2023

This kind of situation is possible and it does not throw any exception:

from metamodel.structural.structural import Class, Property

attribute1: Property = Property(
    name="attr1", owner=None, property_type=PrimitiveDataType("int"))
attribute2: Property = Property(
    name="attr2", owner=None, property_type=PrimitiveDataType("str"))

class1: Class = Class(name="Cls1", attributes=set([attribute1, attribute2]))
class2: Class = Class(name="Cls2", attributes=set([attribute2,]))

This is contrary to the principles of UML, so is it worth to add a "dummy" check?

@FChikh FChikh added the enhancement New feature or request label Oct 12, 2023
@FChikh FChikh added the bug Something isn't working label Nov 2, 2023
@jcabot jcabot removed the enhancement New feature or request label Jan 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants