code: private List<Object> doQueryAndInitializeNonLazyCollections(
  			SharedSessionContractImplementor session,
  			QueryParameters qp,
  			OgmLoadingContext ogmLoadingContext,
  			boolean returnProxies) {
  
  
  		//TODO handles the read only
  		final PersistenceContext persistenceContext = session.getPersistenceContext();
  		boolean defaultReadOnlyOrig = persistenceContext.isDefaultReadOnly();
  		persistenceContext.beforeLoad();
  		List<Object> result;
  		try {
  			try {
  				result = doQuery(
  						session,
  						qp,
  						ogmLoadingContext,
  						returnProxies
  				);
  			}
  			finally {
  				persistenceContext.afterLoad();
  			}
  			persistenceContext.initializeNonLazyCollections();
  		}
  		finally {
  			// Restore the original default
  			persistenceContext.setDefaultReadOnly( defaultReadOnlyOrig );
  		}
  
  		log.debug( "done entity load" );
  		return result;
  	}
docs: Load the entity activating the persistence context execution boundaries
  
  @param session the session
  @param qp the query parameters
  @param ogmLoadingContext the loading context
  @param returnProxies when {@code true}, get an existing proxy for each collection element (if there is one)
  @return the result of the query