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.  [ 2 posts ] 
Author Message
 Post subject: Hibernate mapping file help
PostPosted: Wed Nov 01, 2006 8:05 am 
Newbie

Joined: Wed Nov 01, 2006 7:55 am
Posts: 2
I'm trying apply hibernate to an existing schema that looks like the following:

USER_ATTR: [user_id, attr_name, attr_value]
USER_ENT: [user_id, ent_value]

I need to use both of these tables together to create a User pojo what looks like:

class User {

List attributes;
List entitlements;

getId() {
// work through the attributes until the USER_ID attribute is found, then return the value...
}

}

The user pojo doesn't have a unique identifier as a member variable, but it is held as an attribute - hence the getId() method doing a lookup via the attributes list.

I can't seem to find any documentation on how I could apply hibernate in this situation - 'bags' seem to be right sort of thing, but I'm still not too sure if this is right.

I'd be grateful for any help or pointers in the right direction - please keep in mind that I'm unable to make changes to the db schema or the pojo.

Thanks

jv


Top
 Profile  
 
 Post subject: Re: Hibernate mapping file help
PostPosted: Thu Nov 02, 2006 12:22 pm 
Newbie

Joined: Wed Nov 01, 2006 7:55 am
Posts: 2
Anyone?


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

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.