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

Supporting multiple datamodels with same type names #11543

Closed
2 tasks done
Tracked by #136 ...
RonnyB71 opened this issue Nov 9, 2023 · 0 comments
Closed
2 tasks done
Tracked by #136 ...

Supporting multiple datamodels with same type names #11543

RonnyB71 opened this issue Nov 9, 2023 · 0 comments
Labels
kind/user-story Used for issues that describes functionality for our users. status/ready-for-dev Status: Used for issues that are ready for development. Has been through grooming.

Comments

@RonnyB71
Copy link
Member

RonnyB71 commented Nov 9, 2023

Description

If you generated multiple data models within an app and you happen to name some of the types the same you will get a conflict on the generated C# models. Avoiding types with the same name doesn't seem feasible and we should support this case in order to support the multiple data models scenario. The types are not necessarily the "same" either - a Person type in one model can be different than a Person type in the other model.

Additional Information

This can potentially be solved by using namespacing in the generated models where the model name is used as a namespace in addition to the default Altinn.App.Models like Altinn.App.Models.Hovedskjema.

Tasks

Preview Give feedback
  1. area/data-modeling backend breaking-change
  2. 0 of 1
    ux

Acceptance Criterias

  • Multiple models having a type with the same name without actually beeing the same
  • If possible, the generation of datamodels from Studio should try to compile to see if the generated models causes a build error
  • Data model names must be unique, and user must be given validation error if they try to create data model with the same name as an existing one.
@RonnyB71 RonnyB71 added kind/user-story Used for issues that describes functionality for our users. status/draft Status: When you create an issue before you have enough info to properly describe the issue. status/triage labels Nov 9, 2023
@RonnyB71 RonnyB71 changed the title Supporting multiple datamodels with same types Supporting multiple datamodels with same type names Nov 9, 2023
@nkylstad nkylstad added status/ready-for-specification Status: Used for issues that are ready for functional decription og detailed design. and removed status/draft Status: When you create an issue before you have enough info to properly describe the issue. status/triage labels Nov 27, 2023
@nkylstad nkylstad mentioned this issue Dec 8, 2023
@nkylstad nkylstad added status/ready-for-dev Status: Used for issues that are ready for development. Has been through grooming. and removed status/ready-for-specification Status: Used for issues that are ready for functional decription og detailed design. labels Jan 25, 2024
@nkylstad nkylstad closed this as completed Apr 3, 2024
@github-project-automation github-project-automation bot moved this to 🧪 Test in Team Studio Apr 3, 2024
@nkylstad nkylstad moved this from 🧪 Test to ✅ Done in Team Studio Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/user-story Used for issues that describes functionality for our users. status/ready-for-dev Status: Used for issues that are ready for development. Has been through grooming.
Projects
Archived in project
Development

No branches or pull requests

2 participants