Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
RE: DynamicQuery on DLFileEntryMetadata can't find property
Hi, I am trying to run a query on DLFileEntryMetadata with the following code:
but it raise always this exception:
SystemException: org.hibernate.QueryException: could not resolve property: ddmstorageid of: com.liferay.portlet.documentlibrary.model.impl.DLFileEntryMetadataImplBut ddmstorageid IS a filed of the class DLFileEntryMetadata so I don't understand...
Anyone can give me an hint?
Above this query, I have the very same code/query on DDMContent class and xml property and it works perfectly.
thanks in advance,
Marco
DynamicQuery q=DynamicQueryFactoryUtil.forClass(DLFileEntryMetadata.class);
q.add(PropertyFactoryUtil.forName("ddmstorageid").in(ddmContentsIdsArray));
List<dlfileentrymetadata> fileEntryMetadataList= DLFileEntryMetadataLocalServiceUtil.dynamicQuery(q);</dlfileentrymetadata>
but it raise always this exception:
SystemException: org.hibernate.QueryException: could not resolve property: ddmstorageid of: com.liferay.portlet.documentlibrary.model.impl.DLFileEntryMetadataImplBut ddmstorageid IS a filed of the class DLFileEntryMetadata so I don't understand...
Anyone can give me an hint?
Above this query, I have the very same code/query on DDMContent class and xml property and it works perfectly.
thanks in advance,
Marco
Hi, it turned out that the problem was simply a different 'capitalization' of the property name :-(
Using DDMStorageId works as expected.
see: https://community.liferay.com/forums/-/message_boards/message/113183031
Hope this can help someone else
Marco
Using DDMStorageId works as expected.
see: https://community.liferay.com/forums/-/message_boards/message/113183031
Hope this can help someone else
Marco
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™