The method that you've mentioned is only used during DB reverse
engineering. So if you map a view as a regular DbEntity in the modeler
yourself, running queries against the view should work just fine.
(we still need to update this method in the adapter, as most people
are on MySQL 5 by now that supports views, so thanks for pointing it
out).
Andrus
On Dec 21, 2008, at 12:26 AM, wwwebi wrote:
Hi,
I was wondering how I can enable VIEWs for MySQL 5.x ?
As far as I can see in the adapter implementation of MySQL
(org.apache.cayenne.dba.mysql.MySQLAdapter) the following code
blocks the access to the views:
/**
* Returns null, since views are not yet supported in MySQL. Views
are available on
* newer versions of MySQL.
*/
@Override
public String tableTypeForView() {
return null;
}
would it allow views if this override would be deleted for MySQL
5.x ? Or would there be a need for another override ?
I want to access a legacy view by a named query but it does not work
(xxxx not found).
Thanks for advice,
Martin