I have project with
"php": ">=5.3.3", "symfony/symfony": "2.6.11", and when I open page all entity(in my situation developer) I use standart doctrine fincrion
$all_developer = $this->getDoctrine()->getRepository('ArtelProfileBundle:Developer')->findAll();
public function findAll()
{
return $this->findBy(array(), array('id' => 'ASC'));
}
I wait 4 minutes open page and in debug panel I see download 103mb o_O this is nearly 4000 entity
UPDATE I install DebeshaDoctrineProfileExtraBundle and I see with my entity developer I load table TalentFiles in this table I have file doc docx pdf how to disable this table when I find all develoeprs?
1 10.54 ms 1 SimpleObjectHydrator
r => Artel\ProfileBundle\Entity\Users
2 63.57 ms 100 ObjectHydrator
r => Artel\ProfileBundle\Entity\Developer
e0 => Artel\ProfileBundle\Entity\TalentFiles
I visible for you only field with relationship because I think maybe this is problem for download, when I find Developer doctrine find al entity in relationship. How to exclude all relationship and find all entity without this fields (who have realationship) If use Query Builder how to exclude??? this is my entity:
public function getDevelopers()
{
$qb = $this->getEntityManager()->createQueryBuilder('d');
$qb
->select('d')
->from('ArtelProfileBundle:Developer', 'd')
//how to exclude???
->getQuery();
$query = $qb->getQuery();
$results = $query->getResult();
return $results;
}
Entity Developers and relationship
/**
* Developers
*
* @ORM\Table(name="developers")
* @ORM\Entity(repositoryClass="Artel\ProfileBundle\Entity\DeveloperRepository")
*/
class Developer extends CustomUser
{
///////////other field, I visible for you only field with relation ship
/**
* @ORM\OneToOne(targetEntity="TalentFiles", mappedBy="developer", cascade={"persist"})
*/
protected $talent_file;
/**
* @ORM\OneToMany(targetEntity="CodeUserReference", mappedBy="developer", cascade={"persist", "remove"})
*/
protected $reference_developer;
/**
* @ORM\OneToMany(targetEntity="CodeProjectNotificationLater", mappedBy="developer", cascade={"persist", "remove"})
*/
public $notification_later;
/**
* @ORM\ManyToOne(targetEntity="Teams", inversedBy="developers")
* @ORM\JoinColumn(name="team_id", nullable = true, referencedColumnName="id")
* */
protected $teams;
/**
* @ORM\OneToMany(targetEntity="CodeTalentsProjects", mappedBy="authorId", cascade={"persist"})
*/
protected $projects;
/**
* @ORM\OneToMany(targetEntity="Comments", mappedBy="talent", orphanRemoval=true)
*/
public $comment;
/**
* @ORM\ManyToOne(targetEntity="Artel\ProfileBundle\Entity\Users", inversedBy="add_developer")
*/
protected $added_by;
And some interesting - when I open home page with first page, this page have routing in another action and some information for entity admin thats all, without any entity I wait 15 - 40 second ans download 15-28mb o_0
In frontend I use metronic admin bundle maybe this information help
I add some screen in debug panel maybe this help for diagnostic problem link,link,link,link.Help please, maybe some people have this problem ??