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

FetchPairsHelper: index by IEntity->getPersistedId #116

Closed
wants to merge 1 commit into from
Closed

FetchPairsHelper: index by IEntity->getPersistedId #116

wants to merge 1 commit into from

Conversation

vitkutny
Copy link
Contributor

if key is IEntity use persistedId instead of __tostring()

if key is IEntity use persistedId instead of __tostring()
@hrach
Copy link
Member

hrach commented Sep 10, 2015

I would rather implement __toString in entity. Such conditions in fetchPairs does not seem right.

@vitkutny
Copy link
Contributor Author

I already use __toString for string representation of entity. For product __toString return its name, for page __toString returns title, which is the purpose of __toString method, that string representation is not unique and should not be used for indexing

@hrach
Copy link
Member

hrach commented Sep 10, 2015

Let's introduce an interface! :-) What do you think? IHasKeyIdentifier? :)

@hrach
Copy link
Member

hrach commented Dec 19, 2015

I plan to support sth like ->fetchPairs('this->qr->code', 'title');; so it should solve this usecase.

@hrach hrach closed this Dec 19, 2015
@hrach
Copy link
Member

hrach commented Dec 19, 2015

#147

@vitkutny vitkutny deleted the fetch_pairs_helper_entity_key branch January 21, 2016 08:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants