Optionally generate also Kotlin data class implementations of the EntityViews
See original GitHub issueAlthough even currently the generated java classes have the full-arg constructor, data classes still bring additional benefits:
copy
method- default property values (could be generated from default view interface methods if present)
Moreover, data classes already have suitable equals/hashCode, so the code should be simpler to generate.
Issue Analytics
- State:
- Created a year ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
Data classes | Kotlin
In Kotlin, these are called data classes and are marked with data : ... and meaningful behavior of the generated code, data classes...
Read more >Kotlin Data Class With Optional Fields - Baeldung
In this tutorial, we'll show how to create a class instance with optional fields. First, we'll show how to do it with a...
Read more >Best Practices and Common Pitfalls of Using JPA (Hibernate ...
Let's look at how to avoid the common pitfalls and make the most of using Kotlin. Spoiler alert: data classes are not the...
Read more >Deep Dive Into Kotlin Data Classes for Android
The primary constructor on a data class can only declare properties. You can optionally create a secondary constructor, but it must delegate to ......
Read more >Kotlin data class optional variable - Stack Overflow
I think that's pretty much the only way to go. You could make firstName and lastName non-nullable, but that won't really change much...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes
I’ll fix it for 1.6.8, but I need to debug some annotation processor issues first. I hope I can finish all that this week.
Thanks! What can I expect once #1575 is fixed? That I could use data classes (possibly nested) for simple immutable entity views? Any ETA for the fix?