Jpql query between main and addiitonal datastore

I have one entity SheellegalMasterRegulation in additional datastore and other entity RegulationSubscription in main datastore. This is RegulationSubscription structure -

 @JmixGeneratedValue
    @Column(name = "ID", nullable = false)
    @Id
    private UUID id;

    @SystemLevel
    @Column(name = "REGULATION_ID")
    private UUID regulationId;

    @JoinColumn(name = "USER_ID", nullable = false)
    @NotNull
    @ManyToOne(fetch = FetchType.LAZY, optional = false)
    private User user;

    @DependsOnProperties({"regulationId"})
    @JmixProperty(mandatory = true)
    @NotNull
    @Transient
    private SheellegalMasterRegulation regulation;

I want to select all entities from SheellegalMasterRegulation which are not in RegulationSubscription by this query-

[select e from SheellegalMasterRegulation e where e.id not in (select f.regulationId from RegulationSubscription f)].

This gives following error -
Local Exception Stack:

Exception [EclipseLink-0] (Eclipse Persistence Services - 2.7.9.6-jmix): org.eclipse.persistence.exceptions.JPQLException
Exception Description: Problem compiling [select e from SheellegalMasterRegulation e where e.id not in (select f.regulationId from RegulationSubscription f)].
[68, 82] The state field path ‘f.regulationId’ cannot be resolved to a valid type.
[88, 110] The abstract schema type ‘RegulationSubscription’ is unknown.

Please advice?

You cannot mix entities from different data stores in a single JPQL query. The same as you cannot execute a SQL over two different JDBC datasources.

Thanks @krivopustov, I completed the task by getting list from both tables and them manipulating the list.