<-- Back

Error CE6585: Published entity 'Module.EntityName' must have a key defined

Issue

When attempting to publish an OData Service using Studio Pro, users may encounter an error identified by the code CE6585.

Published entity 'Module.EntityName' must have a key defined

Environment

Studio Pro 9.17.0 and newer

Cause

This error arises when an entity is added without specifying a key attribute. The key attribute is crucial as it uniquely identifies each record within the entity, and without it, the system cannot properly manage the data.

Older Studio Pro versions used Mendix Identifier (unique) as key and hence users did not have to explicitly select unique attributes as key.

Selecting a single attribute as key was introduced in Studio Pro 9.17.0. Selecting multiple attributes as key (only for OData 4) was introduced in Studio Pro 9.19.0.

Solution/Workaround

To resolve this issue, it is essential to ensure that every entity you create includes a designated key attribute. This attribute acts as a unique identifier, enabling the OData Service to function correctly and maintain data integrity. By defining a key attribute for each entity, you can prevent the CE6585 error from occurring and ensure a smooth publishing process for your OData Service.

The key attribute can be chosen when adding the entities.

Screenshot 2025-02-07 at 11.27.12.png

Or, after the entity was added, on the Entity panel, on the right side, click on Add, then mark the checkbox to set the attribute as key.

Screenshot 2025-02-07 at 11.32.03.png

Internal information related

  • 239979
  • C0A044PPS/p1738768006572909

Additional information

Have more questions? Submit a request

0 Comments

Article is closed for comments.

To provide feedback, please open a ticket here. Don't forget to include the article's URL along with the feedback you would like to provide.