Skip to content

Commit e534dcb

Browse files
committed
#25 - ENH: Support setting default schema in connection properties
1 parent 458fc14 commit e534dcb

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
<groupId>io.ebean</groupId>
1212
<artifactId>ebean-datasource</artifactId>
13-
<version>4.5.3-SNAPSHOT</version>
13+
<version>4.6.1-SNAPSHOT</version>
1414

1515
<scm>
1616
<developerConnection>scm:git:[email protected]:ebean-orm/ebean-datasource.git</developerConnection>
@@ -22,7 +22,7 @@
2222
<dependency>
2323
<groupId>io.ebean</groupId>
2424
<artifactId>ebean-datasource-api</artifactId>
25-
<version>4.5</version>
25+
<version>4.6</version>
2626
</dependency>
2727

2828
<dependency>

src/main/java/io/ebean/datasource/pool/ConnectionPool.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,10 @@ public ConnectionPool(String name, DataSourceConfig params) {
232232
this.connectionProps = new Properties();
233233
this.connectionProps.setProperty("user", un);
234234
this.connectionProps.setProperty("password", pw);
235+
final String schema = params.getSchema();
236+
if (schema != null) {
237+
this.connectionProps.setProperty("schema", schema);
238+
}
235239

236240
Map<String, String> customProperties = params.getCustomProperties();
237241
if (customProperties != null) {

0 commit comments

Comments
 (0)