Trouble with Access Groups in sceens

I’m not sure whether it bug or not. I have develope some screen (screen1) for entity$Car. That entity has some constraints which work properly in other screens but in screen1 I have used with a strange request in the XML file:

<data readOnly="false">
    <collection id="carssDc"
                class="com.company.entity.contracts.mkd.Car"
                view="car-view">		
	<loader id="carDl">
			<query>
                <![CDATA[select distinct car from enity$CompanyCar cc 
                join entity$Car car on car.companyCar.id = cc.id 
                where cc.template.id in
                 ('08984e82-02a2-40a1-aff3-10a91a82884c','e5040b84-60b6-3f7e-202d-61d53918d9b8')]]>
            </query>
	 </loader>
  </collection>
</data>

I get result without constraints if I will change join and began selection from entity$Car constraints work again. I have no problem with it just would like to inform you about it.

Hello @marat_gasanyan

Could you describe what constraints are not working?

Regards,
Daniil

This xml file belong to the Car.browser of the EntityCar.java (pojo class). The EnityCar has attribute executor_id. We have constraints which looked like:

{E}.executor_id = :session$userGroupId

So, when I use request like in the topic the constraint doesn’t work. It means that users see all Car from DB. When I change request to

select distinct car from entity$Car car  
                join enity$CompanyCar cc on car.companyCar.id = cc.id 
                where cc.template.id in ...........

The constraint begins to work properly. So, users are able to see just cars which is allowed to them.