Example #1
0
// 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
}
Example #2
0
// 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
}
Example #3
0
func (s *PersonService) EntityManager() *db.Entity {
	return persondao.EntityManager()
}