Skip to Content
0
Former Member
Jan 30, 2018 at 09:09 PM

Flexiblesearch error from java code, but the same query working from HAC - Error: cannot search unknown field 'TableField

802 Views

Note: the below thing was tried in my local (mysql), Dev (HANA) and Stage (Oracle) and my local never had problem with one to many or many to many relation

Explanation:

We have a many to many relation table say representative and representative details. We have the below flex query

SELECT * FROM {rep AS r JOIN repdetails AS rd ON {rd:pk} = {r:repDetails} }

We got the below error

The item could not be created due to the following errors: cannot search unknown field 'TableField(name='rep',langPK='null',type=repDetails)' within type repDetails unless you disable checking , infoMap=TypeInfoMap for type = 8796687892562 code = repDetails superType = 8796093153362 itemTable = repdetails UPTable = repdetails up LTableName =

The above error happenes through dao code as well as from HAC flexiblesearch.

I changed the items.xml few times on the relationship (many to many) added / deleted some fields. Since i ran into the above issue, (Step A) -> I tried to cleanup the orphaned types, deleted the items that are created and did a build and performed system updates.

The issue existed, so i tried with one to many relation and performed Step A mentioned above and it started working in Dev (HANA). But when we tried to deploy to Stage (Oracle), we again ran into error

The item could not be created due to the following errors: cannot search unknown field 'TableField(name='rep',langPK='null',type=repDetails)' within type repDetails unless you disable checking , infoMap=TypeInfoMap for type = 8796687892562 code = repDetails superType = 8796093153362 itemTable = repdetails UPTable = repdetails up LTableName =

But when the one to many query is directly executed in Stage it executed fine and there are no errors. The error happens when the flexible query is executed through dao code.

one to many query Select {r.PK} from {Rep as r}, { RepDetails as rd} where {rd.rep}={r.pk}

I appreciate response of this issue. Thanks!