// is this correct? func GetCustomer(customerId int) *model.Customer { person, _ := persondao.Get(persondao.EntityManager().PK, customerId) if nil == person { return nil } customer := model.Customer{ Person: *person, } return &customer }
// is this correct? func GetProducer(id int) *model.Producer { person, _ := persondao.Get(persondao.EntityManager().PK, id) if nil == person { return nil } producer := model.Producer{ Person: *person, } return &producer }
func (s *PersonService) EntityManager() *db.Entity { return persondao.EntityManager() }