Database synchronisation error - is an sql bypass possible?

Hello, I'm trying to migrate from 3.1.1 through 4.4.2 and into 5.0.0 beta7. All went fine until the version 5, where, when trying to synchronise the data base, I run into this little gem and I am not able to start the server at all: "Request action: executeddlcommands Message: Executing DDL commands for component MyFirstComponent failed. Cause: Error (SQL State: 21000, Error Code: 0) on executing: All changes are rolled back. Stack trace: com.mendix.m2ee.api.AdminException: Executing DDL commands for component MyFirstComponent failed. at com.mendix.core.component.LocalComponent.executeDDLCommands(SourceFile:91) Caused by: com.mendix.connectionbus.ConnectionBusException: Error (SQL State: 21000, Error Code: 0) on executing: UPDATE "index$pricing_reseller"...; All changes are rolled back. at com.mendix.aS.a(SourceFile:87) Caused by: org.postgresql.util.PSQLException: ERROR: more than one row returned by a subquery used as an expression at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse( at org.postgresql.core.v3.QueryExecutorImpl.processResults( at org.postgresql.core.v3.QueryExecutorImpl.execute( at org.postgresql.jdbc2.AbstractJdbc2Statement.execute( at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags( at org.postgresql.jdbc2.AbstractJdbc2Statement.execute( at org.apache.commons.dbcp.DelegatingPreparedStatement.execute( (....)org.eclipse.jetty.util.thread.QueuedThreadPool.runJob( at org.eclipse.jetty.util.thread.QueuedThreadPool$ at " Can I find and edit the SQL queries in order to skip this one? What other solutions might be possible?
2 answers

And should you not first go to the last 3 version then move to the last 4 version. There you have a lot of cleaning up to do before you can go to 5 (and use the final 5 instead of beta 7). Certainly from 3 to 4 you have to look at all your persisitent create new actions you have to check.




You can't directly change how the Modeler tries to synchronize with your database.

You can, however, perform the updates yourself (the ones that are giving you issues). Right before synchronizing you have the option to look at the queries it will run.

Find this update script and try running it yourself. It'll either work, or at the very least, give you some more information on what's going on. You can cancel out of the synch after copying down the scripts.

If you get it to work manually, you can redeploy and synchronize again. It won't need to run the script anymore (obviously).

EDIT: By checking out the script it runs, you can see the subquery that is returning more than one record, as the error states. There might be some bad data in your db for some reason. You'll at least understand the issue better.