Есть необходимость добавить признак активности Отчетам.
При открытии экрана отчетов падает ошибка:
Caused by: java.lang.IllegalArgumentException: An exception occurred while creating a query in EntityManager:
Exception Description: Problem compiling [select r from sngrep_ExtReport r join report_ReportInputParameter p where r.active = :active].
[38, 65] The abstract schema type 'report_ReportInputParameter' is unknown.
at org.eclipse.persistence.internal.jpa.EntityManagerImpl.createQuery(EntityManagerImpl.java:1755) ~[org.eclipse.persistence.jpa-2.7.9-6-jmix.jar:na]
at io.jmix.eclipselink.impl.JmixEclipseLinkQuery.buildJPAQuery(JmixEclipseLinkQuery.java:557) ~[jmix-eclipselink-1.5.4.jar:na]
at io.jmix.eclipselink.impl.JmixEclipseLinkQuery.getQuery(JmixEclipseLinkQuery.java:467) ~[jmix-eclipselink-1.5.4.jar:na]
at io.jmix.eclipselink.impl.JmixEclipseLinkQuery.getResultList(JmixEclipseLinkQuery.java:134) ~[jmix-eclipselink-1.5.4.jar:na]
at io.jmix.eclipselink.impl.JpaDataStore.executeQuery(JpaDataStore.java:576) ~[jmix-eclipselink-1.5.4.jar:na]
at io.jmix.eclipselink.impl.JpaDataStore.loadAll(JpaDataStore.java:167) ~[jmix-eclipselink-1.5.4.jar:na]
at io.jmix.core.datastore.AbstractDataStore.loadList(AbstractDataStore.java:127) ~[jmix-core-1.5.4.jar:na]
at io.jmix.core.impl.UnconstrainedDataManagerImpl.loadList(UnconstrainedDataManagerImpl.java:112) ~[jmix-core-1.5.4.jar:na]
at io.jmix.ui.model.impl.CollectionLoaderImpl._load(CollectionLoaderImpl.java:92) ~[jmix-ui-1.5.4.jar:na]
at io.jmix.ui.model.impl.CollectionLoaderImpl.load(CollectionLoaderImpl.java:75) ~[jmix-ui-1.5.4.jar:na]
at io.jmix.ui.component.dataloadcoordinator.OnFrameOwnerEventLoadTrigger.load(OnFrameOwnerEventLoadTrigger.java:48) ~[jmix-ui-1.5.4.jar:na]
at io.jmix.ui.component.dataloadcoordinator.OnFrameOwnerEventLoadTrigger.lambda$new$0(OnFrameOwnerEventLoadTrigger.java:39) ~[jmix-ui-1.5.4.jar:na]
at io.jmix.core.common.event.EventHub.publish(EventHub.java:170) ~[jmix-core-1.5.4.jar:na]
at io.jmix.ui.screen.Screen.fireEvent(Screen.java:124) ~[jmix-ui-1.5.4.jar:na]
at io.jmix.ui.screen.UiControllerUtils.fireEvent(UiControllerUtils.java:58) ~[jmix-ui-1.5.4.jar:na]
at io.jmix.ui.sys.ScreensImpl.fireScreenBeforeShowEvent(ScreensImpl.java:1364) ~[jmix-ui-1.5.4.jar:na]
at io.jmix.ui.sys.ScreensImpl.show(ScreensImpl.java:357) ~[jmix-ui-1.5.4.jar:na]
at io.jmix.ui.sys.ScreensImpl.showFromNavigation(ScreensImpl.java:452) ~[jmix-ui-1.5.4.jar:na]
at io.jmix.ui.menu.MenuItemCommands$ScreenCommand.run(MenuItemCommands.java:193) ~[jmix-ui-1.5.4.jar:na]
at io.jmix.ui.menu.SideMenuBuilder$MenuCommandExecutor.accept(SideMenuBuilder.java:272) ~[jmix-ui-1.5.4.jar:na]
at io.jmix.ui.menu.SideMenuBuilder$MenuCommandExecutor.accept(SideMenuBuilder.java:257) ~[jmix-ui-1.5.4.jar:na]
at io.jmix.ui.component.mainwindow.impl.SideMenuImpl$MenuItemImpl.menuSelected(SideMenuImpl.java:587) ~[jmix-ui-1.5.4.jar:na]
at io.jmix.ui.widget.JmixSideMenu$1.menuItemTriggered(JmixSideMenu.java:91) ~[jmix-ui-1.5.4.jar:na]
... 99 common frames omitted
В reportDl
добавлен condiition:
<window xmlns="http://jmix.io/schema/ui/window" xmlns:ext="http://jmix.io/schema/ui/window-ext"
messagesGroup="io.jmix.reportsui.screen.report.browse"
caption="msg://io.jmix.reportsui.screen.report.browse/reportBrowser"
extends="io/jmix/reportsui/screen/report/browse/report-browse.xml"
xmlns:c="http://jmix.io/schema/ui/jpql-condition">
<data>
<collection id="reportDc" class="com.example.entity.ExtReport">
<fetchPlan extends="report.view">
<property name="active"/>
</fetchPlan>
<loader id="reportDl">
<query>select r from report_Report r
<condition>
<and>
<c:jpql>
<c:where>r.active = :active</c:where>
</c:jpql>
</and>
</condition>
</query>
</loader>
</collection>
</data>
В базовом экране репротов есть condition
<condition>
<and>
<c:jpql>
<c:join>report_ReportInputParameter p</c:join>
<c:where>p.report.id = r.id and p.className like :javaClassName</c:where>
</c:jpql>
</and>
</condition>
И как я понимаю report_ReportInputParameter
в бд не хранится.
Возможно стоит убрать этот condition из экрана? И разобраться что не так с расширением у condition.
Ибо в ScreenDataXmlLoader#loadQuery
ставится такой condition:
Видимо что-то с наследованием у дескрипторов.
jmix 1.5.4