0
Hello, I am building for my college work a Webservice based on MVC architecture. For a better understanding of the problem I will explain a little how the classes are currently:
- The abstract Model class has as one of the abstract methods the
getTableNamewhich returns the actual table name for the model. - This class uses the trait
DML. - A trait
DMLdepends on the methodgetTableNameto inform the table the functions of select, Insert, update and delete.
My problem is that it is not possible to define the method getTableName as abstract in the trait and class that uses the trait and do not want to be dependent on the trait DML so that this method is abstract.
In short: I need the method getTableName be abstract in the trait because it needs it, but if the class that uses trait also needs this method to be abstract what can be done?