작성
·
548
·
수정됨
답변 2
1
1
ID is supposed to be created and populated from DB, so it is not expected to be given when Constructor is called.
In this class, the item.seId(++sequence) simulate what DB does. But in the real repository class, ID will be populated by the DB. Either way, ID is not expected to be passed which is the reason Constructore does not have the parameter in its method signature.