db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Piechu Piechu" <piech...@wp.pl>
Subject Inheritance question
Date Fri, 09 Dec 2005 10:29:12 GMT
I hava a question regarding usage of beans generated by torque in
conjunction with inheritance. I've got a class hierarchy like this:
                Users
    .--------- | -------------.
Driver      Storekeeper    Admin

I want to use single form with just username adn password  for
authentication of all the roles and forward to the right subapplication
based on user class. While doing it using Users class' object seems
simple, as
List<Users> users = UsersPeer.doSelect(crit);
...
Users u = users.get(0);
logger.debug("Class: " + u.getClass().toString());
This piece of code works as expected - it gives me the right classname.

logger.debug(user.getBean().getClass().toString());

That gives me UsersBean instead of subclass. It may be a lame question,
but shouldn't it return apropriate subclass' bean? And if not, how
should write it to work?

Regards
Jakub Piechnik

----------------------------------------------------
Nie masz pomysłu na prezent?? 
Skorzystaj z podpowiedzi wirtualnego doradcy WP.PL
http://klik.wp.pl/?adr=http%3A%2F%2Fpasaz.wp.pl%2Fswieta.html&sid=598



---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


Mime
View raw message