avram
avram copied to clipboard
The developer should be guided away from direct use of Avram::DeleteOperation(T), rather than <Model>::DeleteOperation
In my naive reading of the documentation, I did not pick up that the developer should not use Avram::DeleteOperation(T)
directly, and should instead use <Model>::DeleteOperation
. This resulted in attributes and a method not being defined when I expected them to be. A note to this effect should be placed in the API doc for Avram::DeleteOperation(T), and delete operations should be explained in the guides.
This is already the case with Avram::DeleteOperation(T)
being an abstract class. I'm actually surprised that you were even able to use it. I would think that it would raise a compile-time error saying something about not being able to instantiate an abstract class.
Do you have an example of how you used it? I'm wondering if you just inherited from it directly to make your own class, and that's why it didn't raise any errors. If that's the case, then yeah, we definitely need some sort of way to say "this is not advised".
Sorry to be unclear. I inherited DeleteOperation(<Model>)
in my custom <Model>DeleteOperation
class. I should have inherited <Model>::DeleteOperation
.
ah, ok. That makes sense. Yeah, we should put a comment in the source, at the very least, to guide you to the other class.