Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Entities named differently to the underlying database table are misnamed in the schema #304

Open
Syreniac opened this issue Jun 23, 2022 · 0 comments

Comments

@Syreniac
Copy link

Syreniac commented Jun 23, 2022

If you have an entity like this:

@Table(name = "EWARLNSYHTATT")
public class EntityWithAReallyLongNameSoYouHaveToAbbreviateTheTable{

}

In the generated schema, the generated type would be "EWARLNSYHTATT" rather than the actual entity name. The underlying problem is in GraphQLJpaSchemaBuilder.resolveTypeName() - instead of doing managedType.getName(), it should arguably be doing managedType.getJavaType().getName().

Alternatively if this is intended, it would be good to get an annotation that could be put on types to control what the generated schema names a given type?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant