mirror of
https://github.com/apache/openjpa.git
synced 2025-02-21 09:35:40 +00:00
Fix SQL comparison failures in bidi eager tests on Oracle by using standard sql92 join syntax.
git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@818349 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
5d3fd3a726
commit
2a98f2b93d
@ -22,6 +22,10 @@ import java.util.List;
|
||||
import javax.persistence.EntityManager;
|
||||
|
||||
import junit.textui.TestRunner;
|
||||
|
||||
import org.apache.openjpa.jdbc.conf.JDBCConfiguration;
|
||||
import org.apache.openjpa.jdbc.sql.DBDictionary;
|
||||
import org.apache.openjpa.jdbc.sql.OracleDictionary;
|
||||
import org.apache.openjpa.persistence.OpenJPAEntityManager;
|
||||
import org.apache.openjpa.persistence.OpenJPAQuery;
|
||||
import org.apache.openjpa.persistence.test.SQLListenerTestCase;
|
||||
@ -43,6 +47,15 @@ public class TestEagerBidiSQL
|
||||
public void setUp() {
|
||||
setUp(BidiParent.class, BidiChild.class);
|
||||
|
||||
|
||||
// If using an Oracle DB, use sql92 syntax in order to get a correct
|
||||
// comparison of SQL. This may not work on Oracle JDBC drivers
|
||||
// prior to 10.x
|
||||
DBDictionary dict = ((JDBCConfiguration) emf.getConfiguration())
|
||||
.getDBDictionaryInstance();
|
||||
if (dict instanceof OracleDictionary) {
|
||||
dict.setJoinSyntax("sql92");
|
||||
}
|
||||
EntityManager em = emf.createEntityManager();
|
||||
em.getTransaction().begin();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user