cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to get flexible query for looking Header Navigation content?

Former Member
0 Likes
1,291

hi community, Im have been looking for a query to validate the content on the Header Navigation

SELECT {NC:content[ANY]} FROM {HeaderNavigationComponent AS NC JOIN CatalogVersion AS CV ON {NC:catalogVersion}={CV:pk} JOIN Catalog AS C ON {CV:catalog}={C:pk}} WHERE {CV:version}='Online' AND {C:id}='apparelProductCatalog' AND {NC:uid}='DefaultHeaderNavigationComponent'

Error: --------------------------------------------------------------------------------------------

Exception message: cannot search unknown field 'TableField(name='content',langPK='0',type=HeaderNavigationComponent)' within type HeaderNavigationComponent unless you disable checking , infoMap=TypeInfoMap for type = 8796124545106 code = HeaderNavigationComponent superType = 8796124512338 itemTable = cmscomponent UPTable = cmscomponentup LTableName = cmscomponentlp PropsTable = props core fields = owner = [owner,OwnerPkString,class de.hybris.platform.util.ItemPropertyValue] itemtype = [itemtype,TypePkString,class de.hybris.platform.util.ItemPropertyValue] modifiedtime = [modifiedtime,modifiedTS,class java.util.Date] creationtime = [creationtime,createdTS,class java.util.Date] pk = [pk,PK,class de.hybris.platform.core.PK] unlocalized fields = onlyonerestrictionmustapply = [onlyOneRestrictionMustApply,p_onlyonerestrictionmustapply,class java.lang.Boolean] uid = [uid,p_uid,class java.lang.String] visible = [visible,p_visible,class java.lang.Boolean] wrapafter = [wrapAfter,p_wrapafter,class java.lang.Integer] sealed = [sealed,sealed,class java.lang.Boolean] navigationnode = [navigationNode,p_navigationnode,class de.hybris.platform.util.ItemPropertyValue] link = [link,p_link,class de.hybris.platform.util.ItemPropertyValue] forceactive = [forceActive,p_forceactive,class java.lang.Boolean] catalogversion = [catalogVersion,p_catalogversion,class de.hybris.platform.util.ItemPropertyValue] name = [name,p_name,class java.lang.String] styleclass = [styleClass,p_styleclass,class java.lang.String] dropdownlayout = [dropDownLayout,p_dropdownlayout,class de.hybris.platform.util.ItemPropertyValue] localized fields = [] )

Accepted Solutions (1)

Accepted Solutions (1)

arvind-kumar_avinash
Active Contributor

Hi Juan Camilo Bejarano - HeaderNavigationComponent is not an OOTB (Out-Of-The-Box) component and therefore until you post the content of items.xml for HeaderNavigationComponent, one can only do some wild guess. My guess is that you do not have an attribute named, content in the HeaderNavigationComponent itemtype.

Moreover, I know the use of [ANY] only with the WHERE clause. Please check https://wiki.hybris.com/display/release5/FlexibleSearch#FlexibleSearch-SyntaxOverview for an example of usage.

Former Member
0 Likes

do you know the relation between SimpleCMSComponent and CMSLinkComponent to create a JOIN ?

arvind-kumar_avinash
Active Contributor
0 Likes

There is no OOTB relation between SimpleCMSComponent and CMSLinkComponent. All the OOTB relations of CMSLinkComponent can be found in cms2-items.xml.

Answers (0)