1-Directional Association

Model:

component("demo",
  dataElement("LicensePlate"),
  dataElement("Car",
    field("licensePlate: DataElement<demo::LicensePlate>")),
  relationship("association",
    end("demo::Car::licensePlate"))
))

LicensePlateDetails:

class CarDetails {
  private DataRef licensePlate;
}

LicensePlateDetails:

class LicensePlateDetails {
}

CarFinderBean:

class CarFinderBean {
  SearchResult<CarData> findByLicensePlateEq(ParameterContext<SearchDetails<CarFindByLicensePlateEqDetails>> searchParameter) {
    SearchDetails<CarFindByLicensePlateEqDetails> searchDetails = searchParameter.getValue();
    CarFindByLicensePlateEqDetails details = searchDetails.getDetails()

    Query query = entityManager.createQuery("select o from Car o where o.licensePlate.id = :LicensePlate");
    query.setParameter("LicensePlate", details.getLicensePlate().getId());

    return fetchData(searchDetails, query);
  }
}