Skip to main content

Solution Data Model to DMS mapping


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

  • Practitioner
  • 2 replies
  • April 28, 2022

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.


Anita Hæhre
Seasoned Practitioner
Forum|alt.badge.img+1
  • Head of Academy and Community
  • 590 replies
  • April 28, 2022

Anyone else in the community having thoughts on this? 


Reply


Cookie Policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings