-
-
Notifications
You must be signed in to change notification settings - Fork 114
Closed
Labels
bugSomething isn't workingSomething isn't workinggood-first-issueGood for newcomersGood for newcomershelp-wantedExtra attention is neededExtra attention is neededscalaPull requests that update Scala codePull requests that update Scala code
Description
Issue Description
Describe your bug in detail.
For normal classes, Scala does not generate get methods for fields by default. So fields cannot be access in other methods.(This is a problem that is not in a hurry to solve)
There are two solutions:
- explicitly add
val / varto the constructor of ordinary class. - or add
@BeanPropertyon field.
If Java interoperability is required, the second method should be used, otherwise the first method should be used. I think the first method should be used here.
https://stackoverflow.com/questions/15639078/scala-class-constructor-parameters.
This problem is very clear and easy to solve. At the same time, Newcomes can understand some knowledge of scala compilation. I hope it can also be as a good first issue.
Your Environment and Setup
- graphql-java-codegen version: 4.1.5-SNAPSHOT
- Build tool: E.g.: Maven/Gradle/SBT
- Mapping Config: E.g.:
<configuration>
<outputDir>${project.build.directory}/generated-sources/graphql</outputDir>
<packageName>io.github.kobylynskyi.graphql.model</packageName>
</configuration>Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggood-first-issueGood for newcomersGood for newcomershelp-wantedExtra attention is neededExtra attention is neededscalaPull requests that update Scala codePull requests that update Scala code