From cb729f6be4adceb9b00b8d3a1bfa1c3c5a5b4804 Mon Sep 17 00:00:00 2001 From: neviyn Date: Fri, 30 Apr 2021 16:36:27 +0100 Subject: [PATCH] Images now fetch their uploader lazily --- src/main/kotlin/uk/co/neviyn/booru/Entity.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/kotlin/uk/co/neviyn/booru/Entity.kt b/src/main/kotlin/uk/co/neviyn/booru/Entity.kt index 39a69e9..56fec1e 100644 --- a/src/main/kotlin/uk/co/neviyn/booru/Entity.kt +++ b/src/main/kotlin/uk/co/neviyn/booru/Entity.kt @@ -44,7 +44,7 @@ open class Role( open class Image( @Column(unique = true) open var filename: String = "", - @ManyToOne + @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "uploader") open var uploader: User = User(), @ManyToMany