<p>Someone requested it. They had a use case for it where they couldn’t simply prevent the rows from getting selected in the DB query with a conditional (which is still definitely the recommended way to go). The only reason I decided to add it was for the sake of defensive coding.</p>

CC BY-SA 3.0
2014-12-03T16:02:13.757Z
2014-12-03T16:02:13.757Z
Brandon Kelly
<p>In the 2.3 release notes, one item reads: </p>

<blockquote>
  <p>ElementsService is now forgiving of an element type whose populateElementModel() method doesn’t return an actual element model.</p>
</blockquote>

<p>I'm curious what the use case is here — When would populateElementModel not return a BaseElementModel, and why would that be okay?</p>

<baseelementmodel>
Why is ElementsService forgiving of an element type whose populateElementModel() method doesn’t return an actual element model
# Why is ElementsService forgiving of an element type whose populateElementModel() method doesn’t return an actual element model

(Asked by: username_0 on 2014-12-03)

In the 2.3 release notes, one item reads:

> ElementsService is now forgiving of an element type whose populateElementModel() method doesn’t return an actual element model.

I'm curious what the use case is here — When would populateElementModel not return a BaseElementModel, and why would that be okay?

**Tags:** baseelementmodel


---

## 1 answers

### Answer by username_1 on 2014-12-03. Score: 1

Someone requested it. They had a use case for it where they couldn’t simply prevent the rows from getting selected in the DB query with a conditional (which is still definitely the recommended way to go). The only reason I decided to add it was for the sake of defensive coding.


---

