Doctrine creates a proxy-object that behaves like an instance of BlogViews
.
This is the BlogViews
"object" you're seeing if you inspect the object with var_dump
.
Doctrine does not load all the properties of that object initially. The proxy handles fetching the properties when you attempt to access them!
This means there is actually no database-query as long as you don't try to access the lazy loading object/collection.
Keep in mind that var_dump
does access these properties to show them to you!
This is expected behavior and doesn't mean the relation is not lazy-fetched.
I hope that clears things up a bit.