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.
> */
> ..verride
> 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
>
This archive was generated by hypermail 2.0.0 : Sun Dec 21 2008 - 04:41:34 EST