Error ORA-01702 during generating model

Hi ,
I’m using Jmix 2.4.1 version and faced issue regarding Generating Model from existing database object.
I’m trying to generate model from oracle View, but receive the below error:

ORA-01702: a view is not appropriate here

I checked the idea.log file and see that Jmix trying to execute ANALYZE TABLE on a view.

Caused by: Error : 1702, Position : 21, Sql = analyze table TORDEV.MHSS_WO_EXPOSURE_TIME compute statistics, OriginalSql = analyze table TORDEV.MHSS_WO_EXPOSURE_TIME compute statistics, Error Msg = ORA-01702: a view is not appropriate here

So how I can solve this problem?
How can I Generate Model from database View?

Thanks,
William.

Hello,
from your description, it looks like it can not generate the model from the view you want, for various reasons - maybe it can’t at all, or is it something Oracle specific …

In your shoes, I would look at this
https://demo.jmix.io/ui-samples/sample/read-only-customers
Its and example of how to use Jmix with database view.
Make a table with the same structure as your view, and generate from that table, then add @DbView
… or if the view is small, write it manually.

Kind regards,
Mladen

Hi

I’ve checked the issue, it does reproduce for the Oracle DB view. Seems that it is Oracle JDBC driver specific.
YouTrack issue created, so you can follow the progress. We will try to provide a solution in one of the next releases.