// 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) Get(field string, value interface{}) (*model.Person, error) { return persondao.Get(field, value) }