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?