You can traverse entities using entity methods, and you can do exactly the same using entity repository, the difference is that you will make extra class and attach it to the entity and the repository also will create some kind of confusion to other developers to know if a certain method is available, they will need to check the entity and the repository.
Is there any other difference? is there any benefit of using custom repositories ? or what is the best practice to handle such situation?
Generally:
methods in an entity should be connected only to this particular entity object (the exception are getter / setter with relations).
methods in a repository should be connected to whole entity class
For example: if you have an Article entity you may create “slugify” method inside entity because you want make slug from title for this particular object.
But if you need, let say, get all articles which are older than one year – you will make such method in repository (because it’s not related to any particular object)