How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!
While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.
legacy-article
learn-legacy-article-disclaimer-text
問題
カスタムコードで'Dynamic Query'を使用しようとして、以下のエラーが発生しました:
ERROR [http-nio-9090-exec-9][DynamicQueryFactoryImpl:83] Unable find model com.liferay.portal.workflow.kaleo.model.impl.KaleoInstanceTokenImpl java.lang.ClassNotFoundException: com.liferay.portal.workflow.kaleo.model.impl.KaleoInstanceTokenImpl
KaleoInstanceTokenにおける動的クエリの使用:
// Create a dynamic query for KaleoInstanceToken DynamicQuery kaleoQuery = DynamicQueryFactoryUtil.forClass(KaleoInstanceToken.class, "kaleoInstanceToken", PortalClassLoaderUtil.getClassLoader()); kaleoQuery.add(PropertyFactoryUtil.forName("classPK").eq(formInstanceRecordVersionId)); kaleoQuery.add(RestrictionsFactoryUtil.eq("companyId", companyId));