掲示板
Document Library Custom Field Search
11年前 に narendar b によって更新されました。
Document Library Custom Field Search
New Member 投稿: 2 参加年月日: 12/02/23 最新の投稿
Hi,
Please find the issue description below.
We have created a custom field as "hindi-description" under "Documents and Media Document".
While uploading the basic document we are providing some data to custom field "hindi-description" which is storing in the "ExpandoValue" table "data_" column.
Please find the attached screenshot.
Suppose I have 2 or 3 versions of the same document then I need to retrieve the latest version.
I am using the below code
ExpandoColumn column = ExpandoColumnLocalServiceUtil.getDefaultTableColumn(10153, DLFileEntry.class.getName(),"hindi-description"); //here 10153 is companyId
if (column != null) {
DynamicQuery query = DynamicQueryFactoryUtil.forClass(ExpandoValue.class,PortalClassLoaderUtil.getClassLoader());
query.add(RestrictionsFactoryUtil.eq("tableId", column.getTableId()));
query.add(RestrictionsFactoryUtil.eq("columnId", column.getColumnId()));
query.add(RestrictionsFactoryUtil.ilike("data", keyword));
List<ExpandoValue> results = ExpandoColumnLocalServiceUtil.dynamicQuery(query);
for (ExpandoValue expandoValue : results) {
System.out.println(" data_ -----> " + expandoValue.getData());
}
}
Please let me know how to get the latest version and its description.
Also please let me know the relation between DlFileEntry and ExpandoValue tables.
Thanks in advance.
Narendar
Please find the issue description below.
We have created a custom field as "hindi-description" under "Documents and Media Document".
While uploading the basic document we are providing some data to custom field "hindi-description" which is storing in the "ExpandoValue" table "data_" column.
Please find the attached screenshot.
Suppose I have 2 or 3 versions of the same document then I need to retrieve the latest version.
I am using the below code
ExpandoColumn column = ExpandoColumnLocalServiceUtil.getDefaultTableColumn(10153, DLFileEntry.class.getName(),"hindi-description"); //here 10153 is companyId
if (column != null) {
DynamicQuery query = DynamicQueryFactoryUtil.forClass(ExpandoValue.class,PortalClassLoaderUtil.getClassLoader());
query.add(RestrictionsFactoryUtil.eq("tableId", column.getTableId()));
query.add(RestrictionsFactoryUtil.eq("columnId", column.getColumnId()));
query.add(RestrictionsFactoryUtil.ilike("data", keyword));
List<ExpandoValue> results = ExpandoColumnLocalServiceUtil.dynamicQuery(query);
for (ExpandoValue expandoValue : results) {
System.out.println(" data_ -----> " + expandoValue.getData());
}
}
Please let me know how to get the latest version and its description.
Also please let me know the relation between DlFileEntry and ExpandoValue tables.
Thanks in advance.
Narendar
添付ファイル: