educative.io

Naming methods at repository's interface

Hi, I get confused with getAccount(Account) and getAccountById(id), do you mean that if i want to get an accoun, i shoudl pass a whole object with just the id?
Thanks in advanced for your response.


Type your question above this line.

Course: https://www.educative.io/collection/10370001/4616975235416064
Lesson: https://www.educative.io/collection/page/10370001/4616975235416064/5409939478020096

Hello Alejandro_Lazaro_Gut,

In the lesson, We are discussing about naming conventions used in repository interface. The names of attributes and function should be based on business-logic behaviour. The function getAccountById(id) does not make sense, as it is a technical name.

ok but why this (underline in orange - Factories section of the course)? Thanks.