ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Josh" <giga...@comcast.net>
Subject How would you perform CRUD operations on a "table per subclass"?
Date Thu, 25 Aug 2005 02:07:15 GMT
All,

 

Given the following:

 

create table application_user (

    user_name varchar(35) not null,    

    password varchar(255) not null,

    first_name varchar(50) not null,

    last_name varchar(50) not null,

    email varchar(255) not null,

    password_hint varchar(255),

    enabled bool,

    constraint pk_application_user_user_name primary key (user_name)

);

 

create table team_administrator (

    user_name varchar(35) not null,

    team_id int8 not null,

    constraint pk_team_administrator primary key (user_name)

);

 

 

ApplicationUser is currently an abstract class.  TeamAdministrator extends
ApplicationUser.  

 

 

 

 

How would you perform inserts/updates using this design?  Is it better to
keep you classes 1:1 with database tables when using IBATIS?

 

Regards,

 

Joshua


Mime
View raw message