tipsy
06/27/2018, 11:38 PMjtravis
06/28/2018, 7:16 PMlemiffe
07/04/2018, 11:26 AM./gradlew run
? (Kotlin + JVM 1.8)
Tables.java:12: error: package javax.annotation is not visible
import javax.annotation.Generated;
^
(package javax.annotation is declared in module java.xml.ws.annotation, which is not in the module graph)
klensi
07/05/2018, 5:23 PMFré Dumazy
07/06/2018, 8:31 AMquiqua
07/06/2018, 12:11 PMkotlin-logging
with ktor
? 😮Бежан Александр
07/16/2018, 6:51 AMdave08
07/16/2018, 5:25 PMmp
07/18/2018, 11:37 PMGokul
07/23/2018, 5:51 AMEntity to DTO conversion
.
I created a data class
for the entity
and added a toDto
method on it. But here the Entity
is aware of the DTO, which isn't really required for the entity. It works fine. But I am not sure if this is the right way of doing it? Any thoughts? 🙏
A simpler version of my code is:
//Person DTO
data class PersonDto (
val name: String
)
//Person Entity
@Entity
@Table(name = "persons")
data class Person(
@Id
val id: Integer,
@Column
val firstName: String,
@Column
val lastName: String
)
{
internal fun toDto(): PersonDto = PersonDto(
name = "${this.firstName} ${this.lastName}"
)
}
spaisey
07/26/2018, 7:05 AMfun Person.toDto() = PersonDto("${firstName} ${lastName}")
. You can then call person.toDto(). The Extension function lives outside the Person class (say, in Extensions.kt) in the same package as the DTO class.ursus
07/29/2018, 10:22 PMBernhard
08/01/2018, 10:06 AMNykykof
08/02/2018, 7:39 AMbdawg.io
08/13/2018, 6:14 PMevanchooly
08/13/2018, 6:52 PMorangy
tipsy
08/20/2018, 9:04 PMoshai
08/21/2018, 11:59 AMvemilyus
08/21/2018, 7:39 PM@Component
always make sure that the class implements some interface. The Spring CGLib Enhancer messes stuff up and causes hard to find `NullPointerException`s.beepdog
08/22/2018, 6:53 PMlistview(controller.configSections) {
cellFragment(ConfigSectionFragment::class)
//This should bind that item
model.itemSelected.bind(selectionModel.selectedItemProperty().isNotNull)
model.selectedConfigSection.bind(selectionModel.selectedItemProperty())
}
works, but using bindSelected(model.selectedConfigSection)
does notFrancis
08/23/2018, 1:59 PMjanvladimirmostert
08/30/2018, 1:37 PMRaghavendra Rao K
09/03/2018, 11:20 AMpankaj
09/03/2018, 12:49 PMLeoColman
09/11/2018, 2:35 AMLeoColman
09/11/2018, 2:38 AMDario Pellegrini
09/11/2018, 4:55 PMAjay
09/17/2018, 6:07 AMLonwabo
09/21/2018, 6:40 AM