Skip to content

Index keys for hash property elements should be namespaced #5

Description

@tystr

Currently, a hashed property may have elements and if these are indexed and the key of the element is the same as a root property, the index key would collide. Prefixing the index key for hash property indexes will resolve this issue.

Take the following object:

class User
{
    /**
     * @Index
     * @Field
     **/
    protected $subscribed;

    /**
     * @Field(type="hash")
     * @Index
     **/
    protected $attributes = array();

if $attributes has an element array('subscribed' => 'yes') the resulting index key would be identical to the one used for the $subscribed property.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions