title: FastAPI pagination query response excludes item id and date
body: <p>I'm trying to implement pagination in my FastAPI-application. I want to display all todo's that a user has added. The problem is that the response I'm getting back is omitting some of the fields that I have defined in my db-model (i.e. fields: created_at, updated_at, owner_id and id). This is what I want the response to look like:</p>
  <pre><code>{
    &quot;items&quot;: [
        {
            &quot;id&quot;: 2,
            &quot;category&quot;: &quot;House&quot;,
            &quot;created_at&quot;: &quot;2022-04-22T08:23:20&quot;,
            &quot;owner_id&quot;: 1,
            &quot;priority&quot;: 1,
            &quot;todo&quot;: &quot;clean&quot;,
            &quot;updated_at&quot;: null
        }
    ],
    &quot;total&quot;: 1,
    &quot;page&quot;: 1,
    &quot;size&quot;: 5
  }
  </code></pre>
  <p>But this is what I currently receive when calling the endpoint:</p>
  <pre><code>{
      &quot;items&quot;: [
          {
              &quot;category&quot;: &quot;House&quot;,
              &quot;priority&quot;: 1,
              &quot;todo&quot;: &quot;clean&quot;
          }
      ],
      &quot;total&quot;: 1,
      &quot;page&quot;: 1,
      &quot;size&quot;: 5
  }
  </code></pre>
  <p>Below you can see my code:</p>
  <pre><code>class Todos(Base):
      __tablename__ = &quot;todos&quot;
  
      id = Column(Integer, primary_key=True, index=True)
      todo = Column(String)
      category = Column(String)
      priority = Column(Integer)
      created_at = Column(DateTime(timezone=True), server_default=func.now())
      updated_at = Column(DateTime(timezone=True), onupdate=func.now())
      owner_id = Column(Integer, ForeignKey(&quot;users.id&quot;))
      owner = relationship(&quot;Users&quot;, back_populates=&quot;todos&quot;)
      
  
  class Todo(BaseModel):
      todo: str
      category: str
      priority: int
  
  
  
  @router.get(
      &quot;/&quot;,
      status_code=status.HTTP_200_OK,
      response_model=Page[Todo],
  )
  async def paginated_todos(
      params: Params = Depends(),
      user: dict = Depends(get_current_user),
      db: Session = Depends(get_db),
  ):
      if user is None:
          raise get_user_exception()
      todo_model = (
          db.query(models.Todos)
          .filter(models.Todos.owner_id == user.get(&quot;id&quot;)).all()
      )
  
      params.size = int(os.environ[&quot;PAGE_SIZE&quot;])
      if todo_model is not None:
          return module_paginate(jsonable_encoder(todo_model), params)
  
      raise http_exception()
  </code></pre>
  <p>When I do a <code>breakpoint()</code> in my code and print <code>module_paginate(jsonable_encoder(todo_model), params)</code> I am able to access all the fields, so there is something going on when the data is returned to whatever client I’m using to call the endpoint (have tried with Postman and built-in swagger/docs). Does anyone have any ideas why this is occurring?</p>