Skip to content

Commit 3cbfb7f

Browse files
authored
Merge pull request #230 from jeffgbutler/master
Change AllColumns to a basic column
2 parents e501fec + c33cbdd commit 3cbfb7f

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

src/main/java/org/mybatis/dynamic/sql/SqlTable.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2016-2019 the original author or authors.
2+
* Copyright 2016-2020 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -82,7 +82,7 @@ public String tableNameAtRuntime() {
8282
return nameSupplier.get();
8383
}
8484

85-
public <T> SqlColumn<T> allColumns() {
85+
public BasicColumn allColumns() {
8686
return SqlColumn.of("*", this); //$NON-NLS-1$
8787
}
8888

src/test/kotlin/examples/kotlin/spring/canonical/CanonicalSpringKotlinTemplateDirectTest.kt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,17 @@ class CanonicalSpringKotlinTemplateDirectTest {
314314
assertThat(rows).hasSize(6)
315315
}
316316

317+
@Test
318+
fun testSelectAllWithSelectStar() {
319+
val rows = template.select(Person.allColumns())
320+
.from(Person) {
321+
allRows()
322+
orderBy(id)
323+
}.withRowMapper(personRowMapper)
324+
325+
assertThat(rows).hasSize(6)
326+
}
327+
317328
@Test
318329
fun testSelect() {
319330
val rows = template.select(

0 commit comments

Comments
 (0)