-->
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: Mapping users class with a access table
PostPosted: Mon Aug 29, 2005 9:46 am 
Newbie

Joined: Mon Aug 29, 2005 8:45 am
Posts: 3
Dear,

i'm trying to map some class in hibernate but I'm having difficult with this.

I have 3 tables in my DB: access, users and level. The access table has 3 columns where one field has a relation with the users table and other field with the level table, it defines the level of user.

So, I have 2 class for the users table: Administrator and User and I need to map the users table, depending of level table. I didn't obtain a result for it. I tried to use in my mapping the tag <joined-subclass> in my Access.hbm.xml with a descriminator for to differentiate the Administrator class when level will be 2 and User class when level will be 1.

How do I make it?

Fields of my tables:
access: id, id_user and id_level
level: id and name
user: id and name


Ask me any question if necessary.

Thx a lot for all.

Sorry for my poor english.


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.