![]() |
![]() |
|
| Index | Recent Threads | Unanswered Threads | Who's Online | Help |
|
|
| No member browsing this thread |
|
Thread Status: Active Total posts in this thread: 7
|
|
| Author |
|
|
Expert Germany Joined: Mar 15, 2004 Post Count: 766 Status: Offline |
Hello Andy & Erik, first of all: Thanks a lot for JPOX 1.1.0 final!!! Great work! We encountered a strange problem with some queries: On MySQL 4.1.13 it works fine, but on higher versions (e.g. the 4.1 version distributed with Ubuntu or the 5.0.18 that comes with SuSE 10.1), I get the following exception: java.sql.SQLException: Unknown column 'THIS.ORGANISATION_ID' in 'on clause'SELECT ...But if I understand it correctly, the solution is very easy: The green comma can be replaced by a CROSS JOIN and in fact this works fine on MySQL 4.1.13 and newer versions (here is the complete query after replacing). I took a look into the MySQLAdapter class, but unfortunately I didn't find how to influence QueryStatement there. At least, I assume that QueryStatement.stmtCandidateSetsSeparator should be "CROSS JOIN" - but probably only for those SQL servers that support "CROSS JOIN". Is my assumption correct? Could you please tell me, how to fix that problem? Best regards, Marco ![]() ---------------------------------------- Best regards, Marco ![]() jfire: free erp, crm, scm and more |
||
|
|
Expert Germany Joined: Mar 15, 2004 Post Count: 766 Status: Offline |
QueryStatement.stmtCandidateSetsSeparator is a char and thus I cannot simply set " CROSS JOIN " ![]() ---------------------------------------- Best regards, Marco ![]() jfire: free erp, crm, scm and more |
||
|
|
Expert Belgium Joined: Mar 12, 2004 Post Count: 2991 Status: Offline |
Marco, please raise a bug ---------------------------------------- Erik Bengtson ![]() |
||
|
|
Expert Germany Joined: Mar 15, 2004 Post Count: 766 Status: Offline |
Hello Erik, thanks for your quick response! I created an issue: http://www.jpox.org/servlet/jira/browse/CORE-2824 And I tried a bit further: I replaced protected char stmtCandidateSetsSeparator = ',';protected String stmtCandidateSetsSeparator = " CROSS JOIN ";Therefore: Shall I replace char by String for the field QueryStatement#stmtCandidateSetsSeparator, create a new class named MySQLQueryStatement (I saw that there are already some in org.jpox.rdbms.query) and override the two newQueryStatement(...) methods in the MySQLAdapter? Do I need to override more methods than just these two? ... or do all database servers that JPOX currently supports accept CROSS JOIN and we can change it globally? Best regards, Marco ![]() ---------------------------------------- Best regards, Marco ![]() jfire: free erp, crm, scm and more |
||
|
|
Expert Belgium Joined: Mar 12, 2004 Post Count: 2991 Status: Offline |
Marco, Your change is good, however, I'm making it less "relational". The stmtCandidateSetsSeparator has dissapeared and I created dba.cartesianProduct method, so it is responsible to generate the CROSS JOIN "Y" Also, the class TableExpression was renamed to LogicSetExpression ---------------------------------------- Erik Bengtson ![]() |
||
|
|
Expert Belgium Joined: Mar 12, 2004 Post Count: 2991 Status: Offline |
fixed in CVS ---------------------------------------- Erik Bengtson ![]() |
||
|
|
Expert Germany Joined: Mar 15, 2004 Post Count: 766 Status: Offline |
Hello Erik, thanks a lot for fixing it! I checked it out already and it seems to work fine. Best regards, Marco ![]() ---------------------------------------- Best regards, Marco ![]() jfire: free erp, crm, scm and more |
||
|
|
|
|
|
Current timezone is GMT May 17, 2012 11:13:44 AM |