I have a relation that the source belong to a ‘SERVER1.order’ and the destination ‘SERVER2.user’. Notice they are from different server.
I have a search process who take all the relation from a form.
When I used that process in servoy 6.0.1 it give me that Warn:
2011-10-06 12:04:27,406 WARN [AWT-EventQueue-0] com.servoy.j2db.util.Debug - Find: skip related search for ‘order_to_user’, relation cannot be used in search
Only with the relation who are in different server.
It doest`n give any warning fine in servoy 5.2.8.
As far as I know, searching across server connections never worked.
That is correct, it never worked, but in Servoy 6 it adds the warning.
Servoy executes the find in sql in the database, that is the reason it does not work when multiple databases are used
Rob
This is a pity. Although I understand why.
One of the nice things about Servoy is this db independency.
The cross-db realations work perfect as long as there is no ‘find’ in the code.
In Servoy 6 though, the ‘finds’ give errors, even when they don’t affect the search results, i.e. when the ‘find-crieria’ are limited to fields of the sourcetable. Its is just the existance of the relation on that table to antother table in another db that triggers this error.
Is my assumption correct?
As a workaround we can modify the foundset with controller.loadRecords(dataSet), where the dataSet is a dataSet with the pk’s created with databaseManager.getDataSetByQuery().
Jos,
This error is triggered when you use the cross-db relation in a find, the bare existence is not a problem.
With ‘use’ i mean fill in a value for searching.
Hope this help,
Rob
Thanks Rob,
It helps. But to generate as few warnings as possible (preferably none, so we have a clear view on our code), I prefer the workaround which works fine.
Maybe a view is an option.
Regards,
Peter
Hi,
I am facing such a problem. In my project, cross db relations are used. When i run this in debug client (from developer) it runs fine leaving a message ‘xx_to_yy cannot be used in a find’ in console. When imported the same solution into the application server, in all case such relations are skipped where used in find mode and runs fine except one where it throws a blank error dialog.
Is there a way to skip cross-db relation in find mode?
servoy version 6.0.5
Thanks
S Misra