JPQL / Domain Filtering a M2M

Hi everyone,

As always any help is appreciated.

I want to only be able to see ‹ h-grid-manager / h-form-manager › if the current user is contained in the ‹ areaManager › m2m relation within the ‹ House › domain. I need to be able to display only the records where the current user is contained within the m2m ‹ areaManager ›.

What I am trying:

  <action-view name="property.manager.add" model="com.axelor.example.db.Example">
       <view name="h-grid-manager" type="grid"/>
       <view name="h-form-manager" type="form"/>
       <domain>:__user__ MEMBER OF</domain>

In the above the model ‹ Example › contains a m2o field named ‹ house ›. The ‹ House › model contains:

<many-to-many name="areaManager" ref="com.axelor.auth.db.User"/>

Thanks in advance, if I manage to find a solution I will post.


Thank you for your inquiry. If you were able to find a solution to the question you posted on the forum, it would be greatly appreciated if you could share your solution with the community. By doing so, other forum members can benefit from your knowledge and experience.

Please consider posting your solution on the forum thread so that it can be easily accessible to others who may be facing a similar challenge. Sharing solutions and insights fosters collaboration and helps create a supportive environment within the forum community.

If you have any further questions or require any assistance, please don’t hesitate to let me know. I’m here to help.

Best regards,