These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: map interface with only 1 subclass?
PostPosted: Thu Nov 13, 2008 10:44 am 
Newbie

Joined: Tue Jan 06, 2004 5:52 am
Posts: 17
Location: Belgium
Hi,

what is the proper way to map an interface that has only 1 subclass as is the usual case if you want to use interfaces in your domain model?

For example:
Code:
public interface User
{
// some getters only for instance
}

and the implementation:
Code:
public class UserImpl implements User
{
// getters and setters and member variables
}


I can map only UserImpl, but then I cannot do: "from User" in my queries. Also suppose there is also a UserGroup that contains a Set<User>, then I also have to map both.

I seems like overkill to use the normal mechanisms as joined-subclass or discriminator. I only want 1 table in the database for my Users.

regards,

Wim


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.