К примеру запрос из экрана созданного на версии платформы 6.* :
select e from techbase$Batch e
where e.machine = :param$machine
and @dateEquals(e.ddate, :custom$date)
order by e.ddate desc
XML дескриптор экрана
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<window xmlns="http://schemas.haulmont.com/cuba/window.xsd"
class="ru.npc_springs.techbase.web.analytic.AverageTemperatureGraphFrame"
messagesPack="ru.npc_springs.techbase.web.screens"
xmlns:chart="http://schemas.haulmont.com/charts/charts.xsd">
<dsContext>
<collectionDatasource id="averageTemperatureDs"
class="ru.npc_springs.techbase.entity.analytic.ValuesHistory"
view="valuesHistory-view">
<query>
<![CDATA[select e from techbase$ValuesHistory e
where e.batch = :custom$batch
AND e.parameter = :custom$parameter
order by e.ddate]]>
</query>
</collectionDatasource>
<collectionDatasource id="batchesDs"
class="ru.npc_springs.techbase.entity.analytic.Batch">
<query>
<![CDATA[select e from techbase$Batch e
where e.machine = :param$machine
and @dateEquals(e.ddate, :custom$date)
order by e.ddate desc]]>
</query>
</collectionDatasource>
<collectionDatasource id="paramNamesDs"
class="ru.npc_springs.techbase.entity.techcard.params.ParamName"
view="paramName-view">
<query><![CDATA[Select distinct e.parameter from techbase$ValuesHistory e
where e.batch = :ds$batchesDs
order by e.parameter.name]]></query>
</collectionDatasource>
</dsContext>
<dialogMode height="600"
width="800"/>
<layout expand="temperatureChart"
spacing="true">
<grid id="grid"
spacing="true">
<columns>
<column flex="0.0"/>
<column flex="0.0"/>
<column flex="0.0"/>
<column flex="0.0"/>
<column flex="0.0"/>
<column flex="1.0"/>
</columns>
<rows>
<row id="batchSelect">
<label align="MIDDLE_CENTER"
value="msg://dateLbl"/>
<dateField id="dateField"
resolution="DAY"/>
<label id="label"
align="MIDDLE_CENTER"
value="msg://batchLbl"/>
<lookupField id="batchLookup"
nullOptionVisible="false"
optionsDatasource="batchesDs"
required="true"
width="250px"/>
<label align="MIDDLE_CENTER"
value="msg://paramLbl"/>
<lookupField id="paramLookup"
optionsDatasource="paramNamesDs"
required="true"
width="300px"/>
</row>
</rows>
</grid>
<chart:stockChart id="temperatureChart"
autoResize="true"
dataDateFormat="YYYY-MM-DD JJ:NN:SS"
width="100%">
<chart:categoryAxesSettings minPeriod="ss"/>
<chart:dataSets>
<chart:dataSet id="dataSet1"
categoryField="ddate"
color="CRIMSON"
datasource="averageTemperatureDs">
<chart:fieldMappings>
<chart:fieldMapping fromField="value"
toField="value"/>
<chart:fieldMapping fromField="measurement"
toField="measurement"/>
<chart:fieldMapping fromField="rangeMin"
toField="rangeMin"/>
<chart:fieldMapping fromField="rangeMax"
toField="rangeMax"/>
</chart:fieldMappings>
</chart:dataSet>
</chart:dataSets>
<chart:balloon borderThickness="1"
shadowAlpha="0"/>
<chart:valueAxesSettings autoGridCount="true"/>
<chart:panels>
<chart:panel id="detailPanel"
mouseWheelScrollEnabled="false"
mouseWheelZoomEnabled="true"
percentHeight="70"
precision="-1"
showCategoryAxis="false"
startDuration="1"
usePrefixes="false">
<chart:stockGraphs>
<chart:stockGraph id="temperatureGraph"
balloonText="<span style='font-size:18px;'>[[value]]</span>"
bullet="ROUND"
lineThickness="2"
type="LINE"
title="Значение"
valueField="value">
</chart:stockGraph>
<chart:stockGraph id="minRange"
valueField="rangeMin"
bullet="ROUND"
balloonText="<span style='font-size:12px;'>Минимум: [[value]]</span>"
type="LINE"
bulletSize="1"
precision="-1"
color="BLACK"
lineColor="BLUE"
title="Минимум"/>
<chart:stockGraph id="maxRange"
valueField="rangeMax"
bullet="ROUND"
balloonText="<span style='font-size:12px;'>Максимум: [[value]]</span>"
type="LINE"
bulletSize="1"
precision="-1"
color="BLACK"
lineColor="BLUE"
title="Максимум"/>
</chart:stockGraphs>
<chart:stockLegend markerType="NONE"
valueTextRegular=" "/>
</chart:panel>
<chart:panel percentHeight="30"
precision="1"
title="№ Прутка">
<chart:stockGraphs>
<chart:stockGraph id="measurementGraph"
cornerRadiusTop="2"
fillAlphas="1"
type="STEP"
valueField="measurement"/>
</chart:stockGraphs>
<chart:stockLegend markerType="NONE"
valueTextRegular=" "/>
</chart:panel>
</chart:panels>
<chart:chartScrollbarSettings autoGridCount="true"
graph="temperatureGraph"
position="TOP"/>
<chart:chartCursorSettings cursorAlpha="1"
cursorPosition="MOUSE"
onePanelOnly="true"
pan="true"
valueLineAlpha="0.2"
valueLineBalloonEnabled="true"
valueLineEnabled="true"/>
<chart:periodSelector dateFormat="YYYY-MM-DD JJ:NN:SS"
hideOutOfScopePeriods="true"
inputFieldWidth="150"
inputFieldsEnabled="true"
position="TOP"
selectFromStart="true">
<chart:periods>
<chart:period count="30"
label="30 секунд"
period="SECONDS"
selected="true"/>
<chart:period count="10"
label="10 Минут"
period="MINUTES"/>
<chart:period count="30"
label="30 Минут"
period="MINUTES"/>
<chart:period count="1"
label="1 Час"
period="HOURS"/>
<chart:period count="3"
label="3 Часа"
period="HOURS"/>
<chart:period count="8"
label="8 Часов"
period="HOURS"/>
<chart:period count="1"
label="1 День"
period="DAYS"/>
<chart:period label="MAX"
period="MAX"/>
</chart:periods>
</chart:periodSelector>
<chart:export position="BOTTOM_RIGHT"/>
</chart:stockChart>
</layout>
</window>
При попытке отредактировать запрос (автокомплит на e.) выдается Studio UI Error: java.lang.NullPointerException: No referencedEntityName passed
Тоже самое, но уже на экране созданном после обновления до версии 7+
select e from techbase_ShotWorkMixtureJournal e
where e.machine = :machine
XML дескриптор
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<fragment xmlns="http://schemas.haulmont.com/cuba/screen/fragment.xsd"
xmlns:chart="http://schemas.haulmont.com/charts/charts.xsd">
<data>
<collection id="shotWorkMixtureJournalsDc"
class="ru.npc_springs.techbase.entity.journal.shot.ShotWorkMixtureJournal"
view="shotWorkMixtureJournal-view">
<loader id="shotWorkMixtureJournalsDl">
<query><![CDATA[select e from techbase_ShotWorkMixtureJournal e
where e.machine = :machine]]></query>
</loader>
</collection>
<collection id="shotWorkMixtureJournalLinesDc" class="ru.npc_springs.techbase.entity.journal.shot.ShotWorkMixtureJournalLine"
view="shotWorkMixtureJournalLine-view_minimal">
<loader id="shotWorkMixtureJournalLinesDl">
<query><![CDATA[select e from techbase_ShotWorkMixtureJournalLine e
where e.shotWorkMixtureJournal = :journal
order by e.date]]></query>
</loader>
</collection>
</data>
<layout expand="shotAnalysisChart" spacing="true">
<hbox spacing="true">
<label id="shotJournalLbl"
align="TOP_LEFT"
value="msg://shotJournalLbl" colspan="1"/>
<lookupField id="shotJournalLookup"
colspan="3"
nullOptionVisible="false"
required="true"
rowspan="1"
optionsContainer="shotWorkMixtureJournalsDc" width="500px"/>
</hbox>
<chart:serialChart id="shotAnalysisChart"
autoMarginOffset="20"
categoryField="date"
dataContainer="shotWorkMixtureJournalLinesDc"
marginRight="40"
marginLeft="40"
mouseWheelZoomEnabled="true"
width="100%">
<chart:valueAxes>
<chart:axis id="v1" axisAlpha="0" ignoreAxisWidth="true" position="LEFT"/>
</chart:valueAxes>
<chart:balloon borderThickness="1" shadowAlpha="0"/>
<chart:graphs>
<chart:graph id="g1" bullet="ROUND" bulletBorderAlpha="1" bulletColor="WHITE" bulletSize="5"
hideBulletsCount="50" lineThickness="2" title="Shot Data"
useLineColorForBulletBorder="true"
valueField="validShotPercent"
balloonText="<span style='font-size:18px;'>[[value]]</span>">
<chart:balloon adjustBorderColor="false"
color="WHITE"
drop="true"/>
</chart:graph>
</chart:graphs>
<chart:categoryAxis dashLength="1"
minorGridEnabled="true"/>
<chart:chartScrollbar autoGridCount="true"
backgroundAlpha="0"
color="#AAAAAA"
graph="g1"
graphFillAlpha="0"
graphLineAlpha="0.5"
offset="30"
oppositeAxis="false"
scrollbarHeight="80"
selectedBackgroundAlpha="0.1"
selectedBackgroundColor="#888888"
selectedGraphFillAlpha="0"
selectedGraphLineAlpha="1"/>
<chart:chartCursor cursorAlpha="1"
cursorColor="#258cbb"
cursorPosition="MOUSE"
limitToGraph="g1"
pan="true"
valueLineAlpha="0.2"
valueLineEnabled="true"
valueLineBalloonEnabled="true"
valueZoomable="true"/>
<chart:valueScrollbar offset="50"
oppositeAxis="false"
scrollbarHeight="10"/>
<chart:export/>
</chart:serialChart>
</layout>
</fragment>