diff --git a/build.gradle b/build.gradle index 1b231ab..340ea80 100644 --- a/build.gradle +++ b/build.gradle @@ -7,7 +7,7 @@ plugins { } group = 'com.nucleodb' -version = '1.17.2' +version = '1.17.3' repositories { mavenCentral() diff --git a/src/integrationTest/java/com/nucleodb/library/ExportTest.java b/src/integrationTest/java/com/nucleodb/library/ExportTest.java index 688418f..33254d3 100644 --- a/src/integrationTest/java/com/nucleodb/library/ExportTest.java +++ b/src/integrationTest/java/com/nucleodb/library/ExportTest.java @@ -154,15 +154,10 @@ public void checkSaving() throws IncorrectDataEntryObjectException, InterruptedE } @Test public void fileSaving() throws IncorrectDataEntryObjectException, InterruptedException { - AuthorDE edgarAllenPoe = new AuthorDE(new Author("Edgar Allen Poe", "fiction")); - authorTable.saveSync(edgarAllenPoe); + AuthorDE author = authorTable.get("name", "George Orwell").stream().findFirst().get(); assertEquals( 1, - authorTable.get( - "id", - edgarAllenPoe.getKey(), - null - ).size() + wroteConnections.getByFrom(author, null).size() ); Thread.sleep(5000); } diff --git a/src/main/java/com/nucleodb/library/NucleoDB.java b/src/main/java/com/nucleodb/library/NucleoDB.java index 14995fb..85163e5 100644 --- a/src/main/java/com/nucleodb/library/NucleoDB.java +++ b/src/main/java/com/nucleodb/library/NucleoDB.java @@ -125,9 +125,9 @@ private void startConnections(String[] packagesToScan, DBType dbType, String rea Type[] toTableTypeArguments = new Type[0]; Type[] fromTableTypeArguments = new Type[0]; if(actualTypeArguments.length==2) { - Class toTable = (Class) actualTypeArguments[0]; + Class toTable = (Class) actualTypeArguments[1]; toTableTypeArguments = ((ParameterizedType) toTable.getGenericSuperclass()).getActualTypeArguments(); - Class fromTable = (Class) actualTypeArguments[1]; + Class fromTable = (Class) actualTypeArguments[0]; fromTableTypeArguments = ((ParameterizedType) fromTable.getGenericSuperclass()).getActualTypeArguments(); }