I'd like to build something like this:
abstract class Owner extends Model {}
class User extends Owner {}
class Group extends Owner {}
class Thing extends Model {}
where every Thing
has one and only one Owner
that can be a Group
OR an User
.
How is it possible? Do I have to make Owner not abstract to let ActiveJDBC map the owner_id-column in the things-table to an owner? But how does it determine what kind of owner we have as http://javalite.io/inheritance says single table inheritance is not implemented in ActiceJDBC.