Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Index keys for hash property elements should be namespaced #5

Open
tystr opened this issue Nov 20, 2014 · 0 comments
Open

Index keys for hash property elements should be namespaced #5

tystr opened this issue Nov 20, 2014 · 0 comments
Labels

Comments

@tystr
Copy link
Owner

tystr commented Nov 20, 2014

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.

@tystr tystr added the bug label Nov 20, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant