-->
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: global metadata - what is the best approach
PostPosted: Sat May 08, 2010 9:00 am 
Newbie

Joined: Fri May 07, 2010 6:41 pm
Posts: 1
Hi,
I'm quite new to hibernate and I'm working on a project that will help me to learn it.
I have a query regarding widely understood metadata.
In my project, I have several tables that contain system settings, entity definitions, users etc.
Can you help me deciding on global approach how to access medatada. For sake of simplicity, lets focus on three entities: users, security profiles and privileges. Each user must have at least one security profile assigned. Each security profile has list of privileges.
Initially I planned to write one object called Metadata. This object would have the following properties: users, securityProfiles. Both would be lists of hibernate POJO classes. The whole metadata would be loaded on startup, and then session would be dropped.
I have the following concern: if users[i] has pointer to securityProfile object sc, and I find the same security profile insecurityProfiles - let's say on index j - will sc==securityProfiles[j]? In other works, if I change security profile taken from securityProfiles list, will the change be visible in security profiles assigned to each user object?
Is this good approach?
Or should I just rely on level 2 cache and do hibernate queries whenever I need to get data? Or maybe there is a better approach?
Kind Regards
Marcin Junger


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.