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

Serializers.register() throws exception when models have same names #478

Open
ellizio opened this issue Mar 27, 2024 · 0 comments
Open

Serializers.register() throws exception when models have same names #478

ellizio opened this issue Mar 27, 2024 · 0 comments
Labels

Comments

@ellizio
Copy link

ellizio commented Mar 27, 2024

If you define a model with name already defined in another plugin you get an exception from

val id = serializer.id
val existing = marshallers[id]
if (existing != null) {
require(existing.fqn == serializer.fqn) { "Can't register ${serializer.fqn} with id: $id, already registered: ${serializer.fqn}" }

because serializer.id has default value based on model name
val id : RdId
get() = RdId(_type.simpleName.getPlatformIndependentHash())

I had to rename my model

@ellizio ellizio changed the title Serializers.register() throws exception when models has same names Serializers.register() throws exception when models have same names Mar 27, 2024
@ForNeVeR ForNeVeR added the bug label Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants