refactor: single column select for subselect

This commit is contained in:
Gauthier Roebroeck 2021-08-31 16:02:41 +08:00
parent 11ed2c4cbf
commit 4446001310
2 changed files with 2 additions and 2 deletions

View file

@ -81,7 +81,7 @@ class BookDao(
return dsl.selectFrom(b)
.where(b.LIBRARY_ID.eq(libraryId))
.and(b.DELETED_DATE.isNull)
.and(b.URL.notIn(dsl.selectFrom(u)))
.and(b.URL.notIn(dsl.select(u.URL).from(u)))
.fetchInto(b)
.map { it.toDomain() }
}

View file

@ -59,7 +59,7 @@ class SeriesDao(
return dsl.selectFrom(s)
.where(s.LIBRARY_ID.eq(libraryId))
.and(s.DELETED_DATE.isNull)
.and(s.URL.notIn(dsl.selectFrom(u)))
.and(s.URL.notIn(dsl.select(u.URL).from(u)))
.fetchInto(s)
.map { it.toDomain() }
}