Solution Data Model to DMS mapping

  • 28 April 2022
  • 2 replies
  • 67 views

I was thinking around the idea of adding the bindings and mappings into the Solution Data Model as directives to have more simpler syntax and UX. The idea is to “hide” the data model storage syntax and bindings syntax so everything can be merged into Solution Data Model GraphQL SDL.

For example if we have following Solution data model
 

type Person @view {
firstName: string
lastName: string
}

The following DMS should be automatically created
 

Data model storage
-----
PersonTable
firstName: string
lastName: string

 

However, if I want to make some overrides, I can use the additional directives. For example:
 

type Activity @view @bind(filter: { hasData: { "in": "Risk" } }) {
position: string @bind("dms.Table2.position")
action: string
line: Asset @bind("dms.Asset")
equipment: Asset
}

In this case, in DMS, the Activity data model can be created automatically as well as the bindings and mappings to the related tables.


Thoughts?


2 replies

Userlevel 6
Badge

Anyone else in the community having thoughts on this? 

I remember we discussed this a long time ago when we first created the bindings concept. We concluded that we can at any time add directives at a later point in order to generate the bindings, but since it’s only syntactic sugar, we haven’t really prioritised it.

Reply