I have a class A that extends the activejdbc.Model class in a common library used in multiple of my projects.
I want to add methods to that class in a project using that library without having to go modify the library (the methods will only be used for this project).
What I did: I created a class B extending class A and added my desired methods.
The problem: When I run JDBC methods such as B.where("foo = ?", bar)
, I get a List<A>
object instead of List<B>
which causes ClassCastException in following code.
I tried to run the ActiveJDBC instrumentation in the second project (the one with class B) but it tells me I do not have any ActiveJDBC model.