Hello, I'm 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 class Model has as one of the abstract methods the
getTableName
that returns the actual table name for the model. - This class uses trait
DML
. - Trait
DML
depends on thegetTableName
method to tell the table the select, insert, update, and delete functions.
My problem is that it is not possible to define the getTableName
method as abstract in trait and in the class that uses trait and do not want to be dependent on trait DML
for this method to be abstract.
In short: I need the getTableName
method to be abstract in trait because it needs it, but if the class that uses trait also needs this method to be abstract what can be done?