|
7 | 7 | import java.sql.Statement; |
8 | 8 |
|
9 | 9 | import org.hibernate.Query; |
| 10 | +import org.hibernate.impl.SessionImpl; |
10 | 11 |
|
11 | 12 | import com.mchange.v2.c3p0.ComboPooledDataSource; |
12 | 13 |
|
@@ -126,7 +127,7 @@ public void testGetGeneratedKey() throws Exception { |
126 | 127 | StringBuffer query = new StringBuffer( |
127 | 128 | "INSERT INTO PHYLOCHAR(TYPE, PHYLOCHAR_ID, VERSION, DESCRIPTION) VALUES('D', default, 0, ?)"); |
128 | 129 |
|
129 | | - Connection con = hibernateTemplate.getSessionFactory().getCurrentSession().connection(); |
| 130 | + Connection con = ((SessionImpl)hibernateTemplate.getSessionFactory().getCurrentSession()).connection(); |
130 | 131 | String queryBuf = "INSERT INTO PHYLOCHAR(TYPE, PHYLOCHAR_ID, VERSION, DESCRIPTION) VALUES('D', default, 0, ?)"; |
131 | 132 | // String idQuery = "identity_val_local()"; |
132 | 133 |
|
@@ -197,7 +198,7 @@ public void testSelectFromInsert() throws Exception { |
197 | 198 | StringBuffer query = new StringBuffer( |
198 | 199 | "INSERT INTO PHYLOCHAR(TYPE, PHYLOCHAR_ID, VERSION, DESCRIPTION) VALUES('D', default, 0, ?) RETURNING phylochar_id"); |
199 | 200 |
|
200 | | - Connection con = hibernateTemplate.getSessionFactory().getCurrentSession().connection(); |
| 201 | + Connection con = ((SessionImpl)hibernateTemplate.getSessionFactory().getCurrentSession()).connection(); |
201 | 202 | //String queryBuf = "INSERT INTO PHYLOCHAR(TYPE, PHYLOCHAR_ID, VERSION, DESCRIPTION) VALUES('D', default, 0, ?)"; |
202 | 203 | // String idQuery = "identity_val_local()"; |
203 | 204 |
|
|
0 commit comments