typhon-project / typhonql

Typhon Query Language
Eclipse Public License 2.0
4 stars 1 forks source link

Add a `set[str] entities` to the extracted ML model #77

Closed DavyLandman closed 4 years ago

DavyLandman commented 4 years ago

Currently, an entity with no fields or relationships will not exists in our model. Either we decide that these entities are not supported, or we have to have a special set of just the entity names.

davidediruscio commented 4 years ago

If needed we can enforce at TyphnML metamodel level, the presence of at least one field in each entity.

DavyLandman commented 4 years ago

That could indeed be an idea, to not allow these identity types.

jdirocco commented 4 years ago

A model validator has been added. In particular, it throws an alert when an entity doesn't contain attribute or relation. Models with empty entities are no longer valid. The xtext concrete syntax reflects this behavior. demo Please, let me know if this solution completely addresses your issue.

DavyLandman commented 4 years ago

Looks good, is there a way to make a nicer message?

jdirocco commented 4 years ago

Yes, it is possible. Currently, I added a custom message, but it doesn't be displayed appropriately. Can we consider this issue as closed?