Skip to content

Logic behind "More than one type wants to be a model for content type" #172

@kows

Description

@kows

Error: "More than one type wants to be a model for content type 'XXX'"
I am wondering why this occurs on a global level.
Would it be breaking to allow this if the two types belong to a different namespace/assembly?

My case:
I'm trying to use some of the generated classes in a shared library cross projects.
But I do not want to limit the option to be able to replace/extend/overwrite the shared implementation.
I had:
Shared.Models.XXX
Project.Models.Builder.cs -> XXX.generated.cs
I can prevent the generation through IgnoreContentType attribute so the Shared version is used and I don't get the above mentioned exception.
But once I want to modify one, I would have to remove the Shared dll and provide all implementations inside the project.

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions