The documentation reads “This function should be used whenever you need to load more than one entity from the database” [emphasis added], so I’m expecting to find what function should be used when you need to load only one entity.

(I’m not asking for support here, but recommending completeness for the subject page.)

CommentFileSizeAuthor
#3 1031692.patch754 bytesjhodgdon

Comments

jhodgdon’s picture

Title: Documentation problem with entity_load » entity_load doc says to use for more than one load - correct?

Hmmm -- good question. I will see if I can find the answer. Probably the answer is that you should just use entity_load() for loading one entity as well, but I really don't know why that was put in there.

jhodgdon’s picture

Title: entity_load doc says to use for more than one load - correct? » entity_load doc should not say to use for more than one load only
Issue tags: +Novice

I talked with EclipseCG in IRC just now, and the answer is that most entities provide their own single-object loading function (such as node_load(), etc.). However, these usually end up calling entity_load() anyway and there is no reason not to just call entity_load() directly. So we should just take that sentence out.

Thanks for posting this issue Daniel!

Good project for a novice doc contributor...

jhodgdon’s picture

Status: Active » Needs review
StatusFileSize
new754 bytes

Here's a patch.

kim-day’s picture

patch looks good

kim-day’s picture

Status: Needs review » Reviewed & tested by the community
jhodgdon’s picture

Version: 7.x-dev » 8.x-dev

Needs to go to d8 and then d7

dries’s picture

Version: 8.x-dev » 7.x-dev

Committed to 8.x. Moving to 7.x.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Committed to 7.x. Thanks!

Status: Fixed » Closed (fixed)
Issue tags: -Novice

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