Most effective way to reflect inheritance relationship in DAOs?
问题 Working on a business application using MVC structure and a Business Object / DAO architecture. For any normal business object, the CRUD functions are fairly straightforward. But what's the best way to handle a parent-child relationship like "Customer is a User"? I know that the following classes are involved: User, UserDAO, Customer, CustomerDAO The Customer class can inherit from the User just fine, but how do you best reflect this in the DAO CRUD functions? 回答1: Martin Fowler has