I am using ActiveRecord in order to store my classes in the database.
I have classes hierarchy, say it Man and Woman inherited from class Human. Human database table contains field Sex which is 0 for man and 1 for woman. I'd like to be able to load class Human with regards to Sex field, that is, if Sex is 0, loading of class Human should actually create instance of class Man (thus reading some additional fields from Man table besides of fields from Human table).
Is it possible with the help of CastleProject ActiveRecord attributes? If not, is it possible to do with overriding some overridable methods?