[jboss-user] [EJB 3.0] - Inheritance of a pojo problem

emailmsgbox do-not-reply at jboss.com
Wed Jul 25 07:02:06 EDT 2007


Hi,

I have the following pojos  and SLSB

  | 
  | public class UserBase implements Serializable{
  | 
  |      private String id;
  |      private String name;
  | 
  | }
  | public class User extends UserBase implements Serializable{
  | 
  |       private String password;
  | 
  | }
  | 
  | public class UserSLSB  implements IUserSLFS  {
  | 
  |       public UserBase getUser(String id){...}
  |       public void updateUser(UserBase userBase ){...}
  |       public void createUser(User user ){...}
  | 
  | }
  | 
  | 

The User table hold 3 fields ID,NAME,PASS
How can use UserBase and User as ejb3 entitys without adding an extra field used by at @DiscriminatorColumn 

I have tried different annotation setting and can get it  to work 
I don't really need the UserBase as an entity just as a data oblect

Ideas ?




View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4067352#4067352

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4067352



More information about the jboss-user mailing list