Recently I have been working on building data entity and there was one strange error wasting my time due to the lack of descriptiveness.
The error was:
Database synchronization failed. You may have to do a full build of the package ‘<package name>’ and all of its dependent packages.
After a complete package build the error was:
Failed to parse data entity view queries for following data entities: <data entity name>
Still not descriptive enough!
I knew there was a problem in the new table that I have added.
HcmWorkerTitle had a relation to this new table.
After reading a couple posts I have got a hint that it could be related to the relation between the new table and the one I tried to join it to.
Fast-forward it was partially related to that:
The relation was not finished, so I’ve finished it by setting Related Table Cardinality value.
I have synchronized and got another error but this time a meaningful one.
The error was:
Data entity field WorkerEmergencyInfo.OfficeLocation is currently mapped to HcmWorkerTitle.OfficeLocation but it should be mapped to WorkerOfficeLocation.OfficeLocationId because HcmWorkerTitle.OfficeLocation is a foreign key field referencing WorkerOfficeLocation.OfficeLocationId.
So basically, it said, don’t add foreign keys to the entity fields(!).
Why? I cannot understand, but at least have a descriptive error message.
So now instead of HcmWorkerTitle.OfficeLocation I have added WorkerOfficeLocation.OfficeLocationId.
That solved the problem and it worked like a charm.
And guess what, just for the test I made the relation incomplete again and it still worked.
So, make your relations right in order to have a descriptive error message.