Patch loosens entity_property_values_create_entity(), and allows passing keys that have no metadata property.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

amitaibu’s picture

And this one is without a typo ;)

fago’s picture

Status: Needs review » Fixed

Makes sense. Thanks, committed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

klausi’s picture

Status: Closed (fixed) » Active

Why? RESTWS relied on this behaviour so that incoming entities with unknown properties were not created. Therefore a RESTWS test case is currently failing.

Updating entities with unknown properties still fails as expected, because the wrapper is used directly. Guess I cannot use entity_property_values_create_entity() anymore and will also have to use the wrapper directly for creation.

klausi’s picture

Status: Active » Closed (fixed)

Well, I can see that this change might be necessary for other modules. So I posted a patch in #1303000: Creating entities with unknown properties should not be possible to fix it in RESTWS.