Altinn / Altinn/app-lib-dotnet
The option to specify which data models that should be auto created when you have an app with multiple data models
- Dominant language
- C#
- Stars
- 8
- Forks
- 27
- Avg merge
- 1h 21m
- Merged PRs (30d)
- 7
Description
### Description
On a data model entry in applicationmetadata.json you can specify autoCreate=true which means data an empty model will be created. Example configuration of a data type:
```
"appLogic": {
"autoCreate": true,
"classRef": "Altinn.App.Models.AllThings",
"allowAnonymousOnStateless": false,
"autoDeleteOnProcessEnd": false,
"shadowFields": {
"prefix": "Hjelpefelt_"
}
```
In applications with multiple data models this means that we will auto create all that has autoCreate set to true. If you need all models, this is fine. But in some apps you have defined multiple data models, but there is a criteria that defines which should be used in a particular instance this behaviour isn't wanted as it will produce empty models that later needs to be excluded on the reciveing end.
### Additional Information
_No response_
Contributor guide
Research direction
Start by reviewing the applicationmetadata.json appLogic entries and how autoCreate=true is processed for applications with multiple data models. Clarify how a particular instance should select models, then verify that only the selected models are created while existing behavior for apps needing all models remains unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100