diff --git a/CommonCore/SQL/src/de/steamwar/sql/EventGroup.kt b/CommonCore/SQL/src/de/steamwar/sql/EventGroup.kt index 5db01dbf..5fb01f30 100644 --- a/CommonCore/SQL/src/de/steamwar/sql/EventGroup.kt +++ b/CommonCore/SQL/src/de/steamwar/sql/EventGroup.kt @@ -90,7 +90,7 @@ class EventGroup(id: EntityID) : IntEntity(id) { set(value) { groupPointsPerDraw = value } - val dependents by lazy { EventRelation.getGroupRelations(this).toList() } + val dependents by lazy { EventRelation.getGroupRelations(this) } val lastFight by lazy { Optional.ofNullable(fights.maxByOrNull { it.startTime }) } fun getId() = id.value diff --git a/CommonCore/SQL/src/de/steamwar/sql/EventRelation.kt b/CommonCore/SQL/src/de/steamwar/sql/EventRelation.kt index 0ca7be22..82c1d03f 100644 --- a/CommonCore/SQL/src/de/steamwar/sql/EventRelation.kt +++ b/CommonCore/SQL/src/de/steamwar/sql/EventRelation.kt @@ -51,11 +51,11 @@ class EventRelation(id: EntityID) : IntEntity(id) { @JvmStatic fun getFightRelations(fight: EventFight) = - useDb { find { (EventRelationTable.fromId eq fight.id.value) and (EventRelationTable.fromType eq FromType.FIGHT) } } + useDb { find { (EventRelationTable.fromId eq fight.id.value) and (EventRelationTable.fromType eq FromType.FIGHT) }.toList() } @JvmStatic fun getGroupRelations(group: EventGroup) = - useDb { find { (EventRelationTable.fromId eq group.id.value) and (EventRelationTable.fromType eq FromType.GROUP) } } + useDb { find { (EventRelationTable.fromId eq group.id.value) and (EventRelationTable.fromType eq FromType.GROUP) }.toList() } @JvmStatic fun create(fight: EventFight, fightTeam: FightTeam, fromType: FromType, fromId: Int, fromPlace: Int) = useDb {