I need load and object from the database and need to store it in session . 

The problem is that the loaded object is too big that when i print it my browse crushes . 

How can i load just the pure object from the database ? 

And here is the code : 

```
if ($session->get('record')->getId()) {
    $record = $this->container->get('myweb.record_repository')->findOneById($session->get('record')->getId());
    $session->set('record', $record);
    print_r($session->get('record'));
    die;
}

```